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 [...]
Monthly Archives: March 2008
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
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
chmod directory recursively but not the file
sudo find /path -type d -exec chmod 777 “{}” \;
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
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
Rake db:migrate to previous version
Migrate to previous version: rake db:migrate VERSION=xx Tags: rails