Tuesday, January 31, 2012

Show whitespace characters in Vim

This toggles showing the whitespaces

:set list!

Thursday, December 22, 2011

Test rails api using curl

curl -i 127.0.0.1:3003/hotels?token=SECRET_TOKEN

Monday, October 24, 2011

Git remove untracked files and directories


git clean -df PATH

Friday, October 21, 2011

Kill detached screen session


screen -XS SESSION NAME quit

Sunday, September 11, 2011

Free up disk space from Dropbox sync

Ran out of disk space on my puny Macbook Air SSD. After tuning down using "Selective Sync", OSX disk utility still reports 7.9GB of space used by ~/Dropbox folder.


rm -rf ~/Dropbox/.dropbox.cache/*


That solved it. Apparently that hidden folder caches files for easy undelete within 3 days.

reference: http://forums.dropbox.com/topic.php?id=31679

Friday, September 9, 2011

Check disk usage in OSX


du -sh *

Friday, July 1, 2011

Fix Terminal in OSX not sourcing .bashrc

Bash in OSX looks for ~/.profile rather than ~/.bashrc so just create the former and add the following.


if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi