Created
April 1, 2010 03:19
-
-
Save arunthampi/351289 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export PATH=$PATH:~/.scripts/ | |
alias sshp='ssh -p 3456' | |
alias scpp='scp -P 3456' | |
alias ssho='ssh -p 443' | |
alias scpo='scp -P 443' | |
# Git Stuff | |
alias gst='git status' | |
alias gco='git checkout' | |
alias gl='git pull' | |
alias gdm='git diff | gitx' | |
# Rails Stuff | |
alias ss='./script/server webrick' | |
alias sc='./script/console' | |
# Unicorn Stuff | |
alias ui='unicorn_rails -p 3000' | |
# For Autotest 3.10.0 | |
export RSPEC=true | |
# MySQL | |
alias mysql='mysql5 -S /tmp/mysql.sock -u root' | |
# Alias JRuby | |
alias jgem='jruby -S gem' | |
# Alias for Jekyll | |
alias je='jekyll --server' | |
# Alias for gitx-remote-diff | |
alias grd='gitx origin/master..' | |
# Git Prompt | |
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:\[\033[31;40m\]\w\[\033[0;33m\]$(parse_git_branch)\[\e[0m\]$ ' | |
# Bash snippet to open new shells in most recently visited dir. | |
# Useful if you want to open a new terminal tab at the present | |
# tab's location. | |
pathed_cd () { | |
if [ "$1" == "" ]; then | |
cd | |
else | |
cd "$1" | |
fi | |
pwd > ~/.cdpath | |
} | |
alias cd="pathed_cd" | |
if [ -f ~/.cdpath ]; then | |
cd $(cat ~/.cdpath) | |
fi | |
if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi | |
RUBYOPT="rubygems" | |
export RUBYOPT | |
# Heroku | |
alias gph='git push heroku' | |
alias hc='heroku console' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment