Skip to content

Instantly share code, notes, and snippets.

@marcgeld
Last active May 25, 2019 16:53
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 marcgeld/85f9575b7bfa953b249f1aebf1ec1aa5 to your computer and use it in GitHub Desktop.
Save marcgeld/85f9575b7bfa953b249f1aebf1ec1aa5 to your computer and use it in GitHub Desktop.
macOS bash_profile
export PATH="/usr/local/sbin:$PATH"
export PATH=$PATH:$M2_HOME/bin
export GROOVY_HOME=/usr/local/opt/groovy/libexec
export GOPATH="${HOME}/.go:${HOME}/devmap/go"
export PATH="$PATH:${GOPATH}/bin"
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/Library/Java/JavaVirtualMachines/jdk.*/Contents/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
}
function removeFromPath() {
export PATH=$(echo $PATH | sed -E -e "s|$1||")
}
setjdk 12
alias gohome='cd $(go env GOPATH | cut -d":" -f2)'
alias brewery='brew update && brew upgrade && brew cleanup'
#export HOMEBREW_GITHUB_API_TOKEN=<api token>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment