Skip to content

Instantly share code, notes, and snippets.

@drhenner
Created April 15, 2016 18:49
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 drhenner/73810bd75ae3f9ad465b214197c51ce2 to your computer and use it in GitHub Desktop.
Save drhenner/73810bd75ae3f9ad465b214197c51ce2 to your computer and use it in GitHub Desktop.
SAMPLE bash_profile
alias backop='cd /User/davidhenner/projects/backops'
alias start_mongo='mongod'
alias start_redis='redis-server'
alias start_memcached='memcached -v'
alias git_sort="git for-each-ref --sort=-committerdate refs/heads/ --format='%(color:magenta)%(committerdate:short)|%(color:green)%(refname:short)|%(color:blue)%(subject)%(color:reset)' | column -ts'|'"
alias git_sort10="git_sort | head -10"
alias git10="git_sort | head -10"
alias git20="git_sort | head -20"
alias git30="git_sort | head -30"
alias gitpush="git push"
alias gitpull="git pull"
alias elastic_start='elasticsearch --config=/usr/local/opt/elasticsearch/config/elasticsearch.yml'
#alias grep_replace='grep -r -l "searchtext" . | sort | uniq | xargs perl -e "s/matchtext/replacetext/" -pi'
# recursive_search_and_replace() { mv "$1" "$1.bak"; cp "$2" "$1"; }
recursive_search_and_replace() {
grep -r -l "$1" . | sort | uniq | xargs perl -e "s/$1/$2/" -pi
}
alias grep_replace=recursive_search_and_replace
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home"
export PATH="$JAVA_HOME/bin:/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
export TERM="xterm-color"
export CLICOLOR=true
export LSCOLORS=gxfxcxdxbxegedabagacad
export GREP_OPTIONS='--color=auto'
export GOOGLE_EMAIL_API_KEY=""
export STRIPE_SECRET_KEY=''
export STRIPE_PUBLISHABLE_KEY=''
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment