Skip to content

Instantly share code, notes, and snippets.

@nkarnik
Last active August 26, 2015 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nkarnik/56504f30df51c137ad77 to your computer and use it in GitHub Desktop.
Save nkarnik/56504f30df51c137ad77 to your computer and use it in GitHub Desktop.
Bashpro
export CLICOLOR=1
export TERM=xterm-color
export JAVA_HOME=$(/usr/libexec/java_home)
# Tell grep to highlight matches
export GREP_OPTIONS='--color=auto'
# MacPorts Installer addition on 2014-08-05_at_08:04:11: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
PATH=$PATH:/usr/local/ec2/ec2-api-tools-1.7.1.0/bin
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="\[\033[0;36m\]\t \u@\h: \w \[\033[0;37m\]\$(parse_git_branch)\n\[\033[0;36m\]\$ \[\033[0m\]"
export PROMPT_COMMAND='echo -ne "\033]0;$PWD\007"'
#PS1="\u@\h: \w$ "
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
PATH=$PATH:~/zb1/motherbrain.jvm/bin
PATH=$PATH:~/zb1/infrastructure/bin
PATH=$PATH:~/zb1/common/bin
PATH=~/zb1/cli/bin:$PATH
PATH=$PATH:~/develop/storm/storm-0.8.2/bin
PATH=$PATH:/usr/local/bin
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
PATH=/Applications/Postgres.app/Contents/Versions/9.3/bin/:$PATH
alias ll="ls -lh"
alias la="ls -lah"
alias ff="find . | grep -v \.git | grep"
alias rgrep="grep -r -nI -s --exclude-dir=log --exclude-dir=.git --exclude=TAGS --exclude=#* --exclude=.#* --color=always"
alias emc="emacsclient"
alias zauth="cat ~/zb1/api/db/seeds.rb | grep "
alias gst="git status"
alias gpl="git pull"
alias gfe="git fetch"
alias gps="git push"
alias gdf="git diff"
alias grefresh="git fetch && git log HEAD..origin/master && git status"
alias gcheckout="git checkout"
alias gcommit="git commit"
alias show_zillabyte_multilangs="ps -ef | grep execute_live | grep -v grep"
alias kill_zillabyte_multilangs="echo 'before kill: '; show_zillabyte_multilangs | wc -l; show_zillabyte_multilangs | awk '{print \$2}' | xargs kill -9; echo 'after kill: '; show_zillabyte_multilangs | wc -l"
# ZillayteLocal
function zl() { ZILLABYTE_API_HOST="localhost" ZILLABYTE_API_PORT="5000" zbd "$@" ;}
# ZillayteTest
function zt() { ZILLABYTE_API_HOST="test.api.zillabyte.com" ZILLABYTE_API_PORT="80" zbd "$@" ;}
# ZillayteProduction
function zp() { ZILLABYTE_API_HOST="api.zillabyte.com" ZILLABYTE_API_PORT="80" zbd "$@" ;}
alias re_source_bash="source ~/.bash_profile"
source ~/scripts/gitcompletion.bash
function inf() { (cd $HOME/zb1/motherbrain.jvm/bin && bundle exec $HOME/zb1/infrastructure/bin/inf "$@"); }
function inf() { (cd $HOME/zb1/infrastructure && bundle exec bin/inf "$@"); }
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOPATH/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment