Last active
August 3, 2018 21:17
-
-
Save PatrickNausha/d92e68143f19547aace94c324d6454dd to your computer and use it in GitHub Desktop.
My 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
source ~/.bashrc | |
export PATH=$PATH:$HOME/utility-scripts:/Applications/apache-jmeter-3.0/bin | |
export EDITOR='subl -w' | |
export TVAPATH=$HOME/code/TV-API | |
export TVRPATH=$HOME/code/FaithlifeTV | |
export ADWPATH=$HOME/code/AssetDesk/src/Logos.AssetDesk.Web | |
export TVMYSQL01HOST=165.225.157.57 | |
export TVUTIL01HOST=72.2.114.121 | |
export TVLB01HOST=64.30.129.42 | |
export CONSULHOST=165.225.158.73 | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
export GOOGLE_APPLICATION_CREDENTIALS=$HOME/SoundFaith-956333700677.json | |
alias util01='ssh -i ~/.ssh/faithlifetv_rsa ubuntu@$TVUTIL01HOST' | |
alias mysql01='ssh -i ~/.ssh/faithlifetv_rsa root@$TVMYSQL01HOST' | |
alias swmysql01='ssh $TVSWMYSQL01' | |
alias consul01='ssh $CONSULHOST' | |
alias tvlb01='ssh $TVLB01HOST' | |
alias tva='cd $TVAPATH' | |
alias adw='cd $ADWPATH' | |
alias dolo=\ | |
'unset DOCKER_TLS_VERIFY;'\ | |
'unset DOCKER_CERT_PATH;'\ | |
'unset DOCKER_MACHINE_NAME;'\ | |
'unset DOCKER_HOST;' | |
alias dosw=\ | |
'export DOCKER_CERT_PATH=/Users/patrick.nausha/.sdc/docker/faithlifetv; '\ | |
'export DOCKER_HOST=tcp://us-sw-1.docker.joyent.com:2376; '\ | |
'export DOCKER_CLIENT_TIMEOUT=300; '\ | |
'export DOCKER_TLS_VERIFY=1;' | |
alias dowest=\ | |
'export DOCKER_CERT_PATH=/Users/patrick.nausha/.sdc/docker/faithlifetv; '\ | |
'export DOCKER_HOST=tcp://us-west-1.docker.joyent.com:2376; '\ | |
'export DOCKER_CLIENT_TIMEOUT=300; '\ | |
'export DOCKER_TLS_VERIFY=1;' | |
alias sdc-production=\ | |
'export SDC_ACCOUNT=faithlifetv; '\ | |
'export SDC_URL=https://us-sw-1.api.joyentcloud.com; '\ | |
'export SDC_KEY_ID=ba:9e:1a:17:61:5a:fa:70:4e:69:19:f0:d3:91:85:28' | |
alias d='docker' | |
alias edit-bash-pro='subl $HOME/.bash_profile' | |
alias reload-bash-pro='source $HOME/.bash_profile' | |
alias dpsa='docker ps -a --format '"'"'table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Status}}\t{{.Label "com.faithlife.shipmate.color"}}'"'" | |
alias flush-dns='sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder && say flushed' | |
alias port-forward-production='ssh -nNT -L 0.0.0.0:3307:192.168.128.8:3306 -L 0.0.0.0:8301:127.0.0.1:8301 -L 0.0.0.0:8500:127.0.0.1:8500 -i ~/.ssh/faithlifetv_rsa root@165.225.158.73' | |
alias shipmate-tv-api='DOCKER_CERT_PATH=~/.sdc/docker/faithlifetv DOCKER_PORT=2376 DOCKER_HOST=us-sw-1.docker.joyent.com CONSUL_IP=127.0.0.1 INTERNAL_CONSUL_IP=192.168.128.14 NODE_TLS_REJECT_UNAUTHORIZED=0 shipmate' | |
alias docker-rm-stopped='docker rm $(docker ps -aq --filter status=exited)' | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
function swap() | |
{ | |
local TMPFILE=tmp.$$ | |
mv "$1" $TMPFILE && mv "$2" "$1" && mv $TMPFILE $2 | |
} | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/Users/patrick.nausha/Downloads/google-cloud-sdk 2/path.bash.inc' ]; then source '/Users/patrick.nausha/Downloads/google-cloud-sdk 2/path.bash.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/Users/patrick.nausha/Downloads/google-cloud-sdk 2/completion.bash.inc' ]; then source '/Users/patrick.nausha/Downloads/google-cloud-sdk 2/completion.bash.inc'; fi | |
# Setting PATH for Python 3.6 | |
# The original version is saved in .bash_profile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" | |
export PATH | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
PROMPT_COMMAND=__prompt_command # Func to gen PS1 after CMDs | |
__prompt_command() { | |
local EXIT="$?" # This needs to be first | |
PS1="" | |
if [ $EXIT != 0 ]; then | |
PS1+="🔥 " | |
fi | |
PS1+="\[\e[1;32m\]\w\[\e[0;36m\]\[\e[1;30m\]\$(parse_git_branch) \[\e[0;36m\]$\[\e[m\] " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment