Skip to content

Instantly share code, notes, and snippets.

POST http://rubyurl.com/api/links
<link>
<website_url>http://github.com/robbyrussell</website_url>
</link>
@liuzhoou
liuzhoou / gist:73142
Created March 3, 2009 02:29
Mac finder AppleShowAllFiles
# show all
defaults write com.apple.finder AppleShowAllFiles -bool true
# hidden .
defaults write com.apple.finder AppleShowAllFiles -bool false
@liuzhoou
liuzhoou / twitter.sh
Created February 24, 2009 07:17
command twitter update
msg=$(echo $@ | sed 's/+/%2B/g;s/ /+/g')
curl --silent --user "username:password" --data-ascii \
"status=$msg" "http://twitter.com/statuses/update.json" > /dev/null
@liuzhoou
liuzhoou / my git shell prompt
Created February 10, 2009 03:41
my git shell prompt
parse_git_branch() {
RSLT=''
GIT_BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' | awk '{print $2}'`
if [ "$GIT_BRANCH" ]
then
GIT_STATUS=`git status 2> /dev/null | grep 'working directory clean'`
CLR='2'
if [ "$GIT_STATUS" ]
then
CLR='2'