Removing NGINX problem in ubuntu ( or debian )

Posted by kusno mudiarto at April 1st, 2008

I got some problem removing NGINX in my computer running ubuntu. It gave me this error :

Removing nginx ...
Stopping nginx: invoke-rc.d: initscript nginx, action "stop" failed.
dpkg: error processing nginx (--remove):
 subprocess pre-removal script returned error exit status 1
Starting nginx: invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)

Fortunately I found the fix to this problem in here : http://www.digitalsanctum.com/2007/11/07/uninstalling-nginx-via-apt-get-stopping-nginx-invoke-rcd-initscript-nginx-action-stop-failed/

Tags:

Posted in software / tools| No Comments | 

Do NOT share mercurial repository between VM :(

Posted by kusno mudiarto at March 31st, 2008

This bug has bitten me once .. I share my mercurial repo between my mac & my linux (running on vmware fusion) using vmware shared disk. Because mercurial is using hardlink and copy-on-write technique, somehow my repository get messed up when I modify it on one platform, and commit it on different platform. NOTE TO SELF: Don’t ever do that again !!!. I’m removing svn & hg from my linux vm, just to be safe..

Posted in idea / rant| No Comments | 

vmware fusion network problem

Posted by kusno mudiarto at March 24th, 2008

Today, suddenly after rebooting my macbook, I couldn’t connect to my guest machine on the VMWare Fusion. I tried disabling / enabling network to no avail. Luckily I found this blog post which showed me the steps to restart vm. It fixed my problem immediately.

sudo /Library/Application\ Support/VMware\ Fusion/boot.sh --restart

Tags:

Posted in software / tools| 1 Comment | 

hash key downcase

Posted by kusno mudiarto at March 20th, 2008

from ruby facets:


class Hash

  def update_keys #:yield:
    if block_given?
      each{ |k,v| delete(k) ; store(yield(k), v) }
    else
      to_enum(:update_keys)
    end
  end

  def key_downcase!
    self.update_keys{|k| k.to_s.downcase}
  end

end

Posted in ruby and rails| No Comments | 

Ruby QuickRef

Posted by kusno mudiarto at March 20th, 2008

Ruby QuickRef

Posted in idea / rant| 1 Comment | 

chmod directory recursively but not the file

Posted by kusno mudiarto at March 18th, 2008

sudo find /path -type d -exec chmod 777 "{}" ;

Posted in software / tools| No Comments | 

Additional path for vim files

Posted by kusno mudiarto at March 17th, 2008

Vim will try to load more configuration / color files from its runtime path. This is the list of runtime path in my mac :

:set runtimepath
runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,~/.vim/after

Posted in software / tools| No Comments | 

running ruby script as batch file in windows

Posted by kusno mudiarto at March 17th, 2008

a little snippet to be put on top of your ruby file so it can run as batch file.

@rem => batch
@ruby %~f0 %*
@goto :eof
batch
# your ruby script here

Blogged with Flock

Tags:

Posted in ruby| No Comments | 

Rake db:migrate to previous version

Posted by kusno mudiarto at March 17th, 2008

Migrate to previous version:

rake db:migrate VERSION=xx

Tags:

Posted in ruby and rails| No Comments | 

Correct usage for with_scope

Posted by kusno mudiarto at December 27th, 2006

see this link for the correct usage for with_scope

I’m still looking for a way to do a more complex query with scope. For example what if I want to find all data that is public, or private but belongs to me. Maybe with_scope is the right tools, maybe not. I have to find out more

powered by performancing firefox

Posted in ruby and rails| No Comments | 

« Previous Postings | Next Postings »