Skip to content

Instantly share code, notes, and snippets.

@dirkraft
Last active March 15, 2018 01:09
Show Gist options
  • Save dirkraft/7606143 to your computer and use it in GitHub Desktop.
Save dirkraft/7606143 to your computer and use it in GitHub Desktop.
.bash_profile (for Mac)includes sections for Bash, Homebrew, Ruby, Python, AWS
###############################################################################
# Globals-ish
export VISUAL=vim
export EDITOR=vim
export JAVA_HOME=`/usr/libexec/java_home`
###############################################################################
# Bash
HISTFILESIZE=16384
HISTSIZE=$HISTFILESIZE
alias cd..="cd .."
alias cd...="cd ../.."
alias cd....="cd ../../.."
alias cd.....="cd ../../../.."
alias cd......="cd ../../../../.."
alias cd.......="cd ../../../../../.."
alias cd........="cd ../../../../../../.."
alias cd.........="cd ../../../../../../../.."
alias cd..........="cd ../../../../../../../../.."
alias cd...........="cd ../../../../../../../../../.."
alias grep="grep --color"
. ~/.bash_prompt
###############################################################################
# Git
export GIT_EDITOR=vim
###############################################################################
# Homebrew
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
###############################################################################
# Ruby
export PATH="$PATH:/usr/local/opt/ruby/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
###############################################################################
# Python
#export PATH="$PATH:/usr/local/lib/python2.7/site-packages"
# pip should only run if there is a virtualenv currently activated
export PIP_REQUIRE_VIRTUALENV=true
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
# set where virtual environments will live
export WORKON_HOME=$HOME/.virtualenvs
# ensure all new environments are isolated from the site-packages directory
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
# use the same directory for virtualenvs as virtualenvwrapper
export PIP_VIRTUALENV_BASE=$WORKON_HOME
# makes pip detect an active virtualenv and install to it
export PIP_RESPECT_VIRTUALENV=true
if [[ -r /usr/local/bin/virtualenvwrapper.sh ]]; then
source /usr/local/bin/virtualenvwrapper.sh
else
echo "WARNING: Can't find virtualenvwrapper.sh"
fi
###############################################################################
# AWS
# aws unified cli
complete -C aws_completer aws
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment