Monthly Archives: March 2008

Do NOT share mercurial repository between VM :(

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 [...]

Posted in idea / rant | Leave a comment

vmware fusion network problem

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: vmwareproblem

Posted in software / tools | 3 Comments

hash key downcase

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 | Leave a comment

Ruby QuickRef

Ruby QuickRef

Posted in idea / rant | 3 Comments

chmod directory recursively but not the file

sudo find /path -type d -exec chmod 777 “{}” \;

Posted in software / tools | Leave a comment

Additional path for vim files

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 | Leave a comment

running ruby script as batch file in windows

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: ruby

Posted in ruby | Leave a comment

Rake db:migrate to previous version

Migrate to previous version: rake db:migrate VERSION=xx Tags: rails

Posted in ruby and rails | Leave a comment