Last active
June 12, 2017 00:09
-
-
Save diogolundberg/8ffea02c1ff158182d2d1f1f3c22eb1f to your computer and use it in GitHub Desktop.
Mac OS bash profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ll='ls -lah' | |
alias virtualenv2='~/Library/Python/2.7/bin/virtualenv' | |
alias virtualenv3='~/Library/Python/3.4/bin/virtualenv' | |
alias pg-server='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' | |
alias pg-server-stop='pg_ctl -D /usr/local/var/postgres stop -s -m fast' | |
alias pg-server-status='pg_ctl -D /usr/local/var/postgres status' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -s "$HOME/.profile" ]] && . "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.bash_aliases" ]] && . "$HOME/.bash_aliases" # Load the default .bash_aliases | |
[[ -s "$HOME/.bashrc" ]] && . "$HOME/.bashrc" # Load the default .bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disables the Apple's new 'feature' that splis your histories in folders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setjdk() { | |
if [ $# -ne 0 ]; then | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
if [ -n "${JAVA_HOME+x}" ]; then | |
removeFromPath $JAVA_HOME | |
fi | |
export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
export PATH=$JAVA_HOME/bin:$PATH | |
fi | |
java -version | |
} | |
function removeFromPath() { | |
export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;") | |
} | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$HOME/Library/Python/2.7/bin/virtualenvwrapper.sh" ] && . "$HOME/Library/Python/2.7/bin/virtualenvwrapper.sh" # This loads virtualenvwrapper | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home" | |
export PYTHON2_HOME="/Library/Frameworks/Python.framework/Versions/2.7" | |
export PATH="$PYTHON2_HOME/bin:$PATH" | |
export PYTHON3_HOME="/Library/Frameworks/Python.framework/Versions/3.5" | |
export PATH="$PYTHON3_HOME/bin:$PATH" | |
export PYTHONPATH="$HOME/Library/Python/2.7" | |
export PATH="$PYTHONPATH/bin:$PATH" | |
export NETBEANS_HOME="$HOME/dev/ide/netbeans" | |
export PATH="$NETBEANS_HOME/bin:$PATH" | |
export ANT_HOME="$HOME/dev/tools/ant/dist" | |
export PATH="$ANT_HOME/bin:$PATH" | |
export SQUIRREL_SQL_HOME="$HOME/dev/tools/squirrel-sql/sql12/output/dist" | |
export PATH="$SQUIRREL_SQL_HOME:$PATH" | |
export RAR_HOME="$HOME/dev/tools/rar" | |
export PATH="$RAR_HOME:$PATH" | |
export RVM_HOME="$HOME/.rvm/bin" | |
export PATH="$RVM_HOME:$PATH" | |
export GRADLE_HOME="$HOME/dev/tools/gradle-2.10" | |
export PATH="$GRADLE_HOME/bin:$PATH" | |
export NVM_DIR="$HOME/.nvm" | |
export WORKON_HOME="$HOME/.virtualenvs" | |
export ODBCINI="/etc/odbc.ini" | |
export ODBCSYSINI="/etc" | |
export FREETDSCONF="/usr/local/Cellar/freetds/1.00.9/etc/freetds.conf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment