Skip to content

Instantly share code, notes, and snippets.

@i-arindam
Last active May 6, 2020 08:56
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 i-arindam/844280af7d229a0ac740 to your computer and use it in GitHub Desktop.
Save i-arindam/844280af7d229a0ac740 to your computer and use it in GitHub Desktop.
Public .bash_profile
export GIT_MERGE_AUTOEDIT='no'
alias rdm='rake db:migrate'
alias migratefortests='bin/rails db:migrate RAILS_ENV=test'
# Utils
alias comcount='git shortlog -sn | grep -i arindam | cut -f 1 | paste -sd+ - | bc'
alias reload='source ~/.bash_profile'
alias editp='vim ~/.bash_profile'
alias gemcount='gem list | wc -l'
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Add git branch to prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\W\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
# \u = username
# \h = hostname
# \w = current working directory
# END
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Postgres
export PATH="/usr/local/opt/postgresql@10/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment