Skip to content

Instantly share code, notes, and snippets.

@arcezd
Last active April 3, 2018 21:08
Show Gist options
  • Save arcezd/e596f88a577f39b732f0e847f3415c54 to your computer and use it in GitHub Desktop.
Save arcezd/e596f88a577f39b732f0e847f3415c54 to your computer and use it in GitHub Desktop.
Bash profile [MacOS]
# Homebrew EXPORT
export PATH="$PATH:$HOME/.local/bin"
# NVM EXPORT
export NVM_DIR="$HOME/.nvm"
source $(brew --prefix nvm)/nvm.sh
# PYENV EXPORT
export PYENV_ROOT=/usr/local/var/pyenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
# GoLANG EXPORT
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
# Google Cloud SDK
export PATH="$PATH:$HOME/.gcloud-sdk/bin"
# Java Home EXPORT
jhome () {
export JAVA_HOME=$(/usr/libexec/java_home -v $@)
echo "JAVA_HOME:" $JAVA_HOME
echo "java -version:"
java -version
}
# Docker Hosts
Docker.Prod1 () {
export DOCKER_HOST=tcp://node-01:2376
export DOCKER_CERT_PATH=~/.docker/azd.ca.tls/
export DOCKER_TLS_VERIFY=1
echo "export DOCKER_HOST=$DOCKER_HOST"
echo "export DOCKER_CERT_PATH=$DOCKER_CERT_PATH"
echo "export DOCKER_TLS_VERIFY=$DOCKER_TLS_VERIFY"
docker info
}
# PS1 Bash
export PS1="\[\e[0;37m\]\u \[\e[0;31m\]\w\[\e[0;33m\]> \[\e[0m\]"
function _update_ps1() {
PS1="$(~/.go/bin/powerline-go -error $?)"
}
if [ "$TERM" != "linux" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
# Custom Commands
alias ll='ls -lG'
# Force ssh to use Tmux
function ssh-tmux () {
/usr/bin/ssh -t $@ "
if which tmux > /dev/null; then
tmux attach-session -t arced || tmux new-session -s arced
fi
";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment