Skip to content

Instantly share code, notes, and snippets.

@cbfrance
Created September 22, 2009 02:32
Show Gist options
  • Save cbfrance/190741 to your computer and use it in GitHub Desktop.
Save cbfrance/190741 to your computer and use it in GitHub Desktop.
my .bash_profile
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\u@\h \[\033[1;33m\]\w\[\033[0m\]$(parse_git_branch)$ '
#Amazon EC2 Command-Line Tool
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
export EC2_CERT=`ls $EC2_HOME/cert-*.pem`
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
#misc stuff
alias ll='ls -lah'alias ss='script/server'
alias sc='script/console'
alias sel='ruby ruby test/selenium/selenium_suite.rb'
alias svnup='svn up && svn log --limit 3'
alias selenium='ruby test/selenium/selenium_suite.rb'
alias mate='open -a TextMate.app'
alias synergize='/Applications/synergy-1.3.1/synergys -f --config /Applications/synergy-1.3.1/synergy.conf'
alias watchapache='tail -f /opt/local/apache2/logs/error_log'
alias watchphp='tail -f ~/phperror.log '
alias mcompass='cd /Users/chris/svn/meedan_php/static/compass && compass -w'
alias a='apache2ctl restart'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment