Created
October 8, 2010 21:43
-
-
Save gtzilla/617623 to your computer and use it in GitHub Desktop.
This file contains 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
# display current git branch | |
export WORKON_HOME=$HOME/.virtualenvs | |
source /usr/local/bin/virtualenvwrapper.sh | |
function has_virtualenv { | |
if [ -e .venv ]; then | |
curr_env=`cat .venv` | |
workon $curr_env | |
fi | |
} | |
# function venv_cd () { | |
# cd "$@" && has_virtualenv | |
# } | |
# alias cd="venv_cd" | |
function parse_git_branch { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
# display current svn branch | |
function parse_svn_branch { | |
svn info 2> /dev/null | grep '^URL:' | egrep -o '(tags|branches)/[^/]+|trunk' | egrep -o '[^/]+$' | awk '{print "(" $1 ")"}' | |
} | |
# display current mercurial branch | |
function parse_hg_branch { | |
hg branch 2> /dev/null | awk '{print "(" $1 ")"}' | |
} | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[0;32m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_PURPLE="\[\033[1;35m\]" | |
LIGHT_CYAN="\[\033[1;36m\]" | |
WHITE="\[\033[00m\]" | |
#\$(parse_svn_branch)\$(parse_hg_branch) | |
export PS1="$LIGHT_GREEN\h$LIGHT_CYAN \w$WHITE:$YELLOW\$(parse_git_branch)$WHITE\$ " | |
alias listen_websocket="sudo tcpdump -A -f -i lo0 port 9499" | |
alias exfm="cd ~/Documents/exfm" | |
alias py="python" | |
alias digiwhack="cd /Users/gregorytomlinson/Documents/projects/website/digiwhack" | |
alias phone="ssh root@digiwhack.com" | |
alias projects="cd $HOME/projects/projects/" | |
alias ll="ls -lska" | |
alias go_jobs="exfm; ssh -i jobs.pem ubuntu@ec2-184-73-54-14.compute-1.amazonaws.com" | |
alias workoff="deactivate" | |
export EC2_HOME=~/.ec2 | |
export PATH=$PATH:$EC2_HOME/bin:/opt/local/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/ | |
# this is for android port forwarding | |
#http://code.google.com/p/android-scripting/wiki/RemoteControl | |
export AP_PORT=9999 | |
## | |
# Your previous /Users/gregorytomlinson/.bash_profile file was backed up as /Users/gregorytomlinson/.bash_profile.macports-saved_2010-05-01_at_16:40:47 | |
## | |
# MacPorts Installer addition on 2010-05-01_at_16:40:47: adding an appropriate PATH variable for use with MacPorts. | |
export PATH=/opt/local/bin:/usr/local/sbin:/opt/local/sbin:~/dev/android-sdk-mac_86/tools:/usr/local/bin:~/bin:$PATH | |
# Finished adapting your PATH environment variable for use with MacPorts. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment