Skip to content

Instantly share code, notes, and snippets.

@fijiwebdesign
Created April 21, 2017 11:59
Show Gist options
  • Save fijiwebdesign/e9fd50191db46457d41372a91c5218ed to your computer and use it in GitHub Desktop.
Save fijiwebdesign/e9fd50191db46457d41372a91c5218ed to your computer and use it in GitHub Desktop.
.bash_profile
# working on
# cd ~/www/factmata
# chrome shortcuts
function chrome() { open /Applications/Google\ Chrome.app/ "$*"; }
function google() { open /Applications/Google\ Chrome.app/ "http://www.google.com/search?q=$*"; }
# tab status
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# Add git branch if its present to PS1
color_prompt='yes'
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi
# android sdk
export ANDROID_HOME=/Users/$(whoami)/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# virtualenv
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export EDITOR='subl -w'
PATH=$PATH:~/bin:/usr/local/Cellar/php56/5.6.24/bin
# add vlc to path
export PATH
alias vlc='/Applications/VLC.app/Contents/MacOS/VLC -I rc'
# open chrome with a socks proxy
alias chrome-socks='(ssh -Nf -D 8123 [email protected] | "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --proxy-server="socks5://localhost:8123" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE 127.0.0.1" "http://whatismyip.com/")'
# increase max open files so you can serve 1M concurrent tcp requests ;)
#sudo ulimit -n 12288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment