Skip to content

Instantly share code, notes, and snippets.

@rebeccacremona
Last active June 22, 2017 19:57
Show Gist options
  • Save rebeccacremona/e053006fc779729fde6767634341c388 to your computer and use it in GitHub Desktop.
Save rebeccacremona/e053006fc779729fde6767634341c388 to your computer and use it in GitHub Desktop.
Virtualenvwrapper config
# No dupes
export HISTCONTROL=ignoreboth:erasedups
# Eternal bash history.
# ---------------------
# Undocumented feature which sets the size to "unlimited".
# http://stackoverflow.com/questions/9457233/unlimited-bash-history
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="%F %T "
# Change the file location because certain bash sessions truncate .bash_history file upon close.
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
export HISTFILE=~/.bash_eternal_history
# Force prompt to write history after every command.
# http://superuser.com/questions/20900/bash-history-loss
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
# Virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/code
source /usr/local/bin/virtualenvwrapper.sh
# Git helpers
rebase_upstream () {
if [ -z "$1" ]
then
upstream_branch="develop"
else
upstream_branch=$1
fi
git fetch upstream && git rebase upstream/$upstream_branch
}
alias git_graph="git log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(auto)%d%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"
alias push_heroku="git push heroku HEAD:master"
# Rbenv
export RBENV_ROOT="/usr/local/var/rbenv"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# Docker Helpers
alias dfab="docker-compose exec web fab"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment