Created
July 11, 2020 02:48
-
-
Save mmontag/c4292b83904739f4fde5149fae62d9a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Extended history | |
export HISTFILESIZE=90000 | |
export HISTSIZE=90000 | |
export PROMPT_COMMAND='history -a' | |
# Don't log duplicates, and ignore commands that start with a space | |
export HISTCONTROL=erasedupes:ignorespace | |
# Show a timestamp | |
export HISTTIMEFORMAT='%Y-%m-%d %H:%M ' | |
# Append to same file for multiple shells | |
shopt -s histappend | |
# Bash completion for Git | |
. $(brew --prefix)/etc/bash_completion.d/git-prompt.sh | |
# # Feb 20 2014, `hub` for github cli | |
# # installed via `brew install hub` | |
# # see https://github.com/github/hub | |
# # also, for GHE, run `git config --global --add hub.host my.git.org` | |
# eval "$(hub alias -s)" | |
# if [ -f .hub.bash_completion.sh ]; then | |
# . ~/.hub.bash_completion.sh | |
# fi | |
# Disabled Jan 30, 2019. | |
# Fancy colors and git status in bash prompt | |
red=$(tput setaf 1) | |
green=$(tput setaf 2) | |
yellow=$(tput setaf 3) | |
blue=$(tput setaf 4) | |
bold=$(tput bold) | |
reset=$(tput sgr0) | |
PS1='\[$yellow\]\u\[$red\]:\[$green\]\W\[$reset\]\[$blue\]$(__git_ps1)\[$reset\] \$ ' | |
### Added by the Heroku Toolbelt | |
# export PATH="/usr/local/heroku/bin:$PATH" | |
# Disabled Apr 25, 2020. | |
# This is a workaround for bad OS X default path order. | |
# see http://stackoverflow.com/questions/5364614 | |
export PATH="~/bin:/usr/local/sbin:/usr/local/bin:$PATH" | |
# Postgres.app psql path, to override the one at /usr/bin/psql | |
export PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH" | |
# # Setup for Python virtualenv | |
# # see http://www.gyford.com/phil/writing/2010/09/29/django-environment.php | |
# export WORKON_HOME=$HOME/.virtualenvs | |
# source /usr/local/bin/virtualenvwrapper.sh | |
# export PIP_VIRTUALENV_BASE=$WORKON_HOME # Tell pip to create its virtualenvs in $WORKON_HOME. | |
# export PIP_RESPECT_VIRTUALENV=true # Tell pip to automatically use the currently active virtualenv. | |
# # Sep 2 2018 | |
# # Run some pyenv so that we can compile glib | |
eval "$(pyenv init -)" | |
# Disabled Jan 30, 2019. | |
# Enabled Apr 25, 2020. | |
# Feb 8 2014 | |
# Pythonpath stuff for homebrew-installed opencv | |
# see http://www.jeffreythompson.org/blog/2013/08/22/update-installing-opencv-on-mac-mountain-lion/ | |
# Disabled April 23, 2018 because of client-ios python problems. | |
# export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH | |
# # Postgres Heroku database for Mixtapes. Used by Flask app config (conf.py) | |
# # export DATABASE_URL=postgresql://cavjmltpatfwda:67tiHMxwIgDaaqS71b6RBJcKLE@ec2-54-243-223-183.compute-1.amazonaws.com:5432/d35p9eb8rqrf9h | |
# # export DATABASE_URL=prostgresql://localhost:5432 | |
# Disabled Jan 30, 2019. | |
# # Python MySQL garbage | |
# # see http://stackoverflow.com/questions/1448429/how-to-install-mysqldb-python-data-access-library-to-mysql-on-mac-os-x#1448476 | |
# export PATH=/usr/local/mysql/bin:$PATH | |
# export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ | |
# # Sep 5 2014 | |
# # And the accompanying stupid Mac OS X 10.8 workaround | |
# # see http://stackoverflow.com/a/15093403/264970 | |
# sudo () { ( unset LD_LIBRARY_PATH DYLD_LIBRARY_PATH; exec command sudo $* ) } | |
# Disabled Jan 30, 2019. | |
# Git Aliases | |
# Only the most frequent and verbose commands need an alias. | |
# see http://www.theint.ro/blogs/outro/4649682-git-for-busy-people-see-what-youre-doing | |
# see https://github.com/benhoskings/dot-files/blob/master/files/.aliases/git | |
alias gits='git status --ignore-submodules=none' | |
alias gitd='git diff' | |
alias gitl='git log --no-merges --graph --pretty="format:%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset"' | |
# These are a little more touchy. Use tab completion | |
alias gitadd-updated='git diff --relative --name-only --ignore-submodules | xargs git add' | |
alias gitfetch='git fetch origin master' | |
alias gitrebase='git rebase -i origin/master' | |
alias gitsubmodule-update-init-recursive='git submodule update --init --recursive' | |
# June 15, 2015 Cleanup old branches | |
# Alias 'git cleanup' in global git config is disabled. (git config -e --global) | |
# Usage: gitrmb | xargs -n 1 git push --delete origin | |
# gitlmb | xargs -n 1 git branch -d | |
alias gitlmb="git branch --merged | grep -v '* ' | grep -v ' master'" | |
alias gitrmb="git branch -r --merged | grep montag | sed 's/origin\///'" | |
# Git branch dates | |
# http://www.commandlinefu.com/commands/view/2345/show-git-branches-by-date-useful-for-showing-active-branches | |
function gitb() | |
{ | |
for k in $(git branch $@ | sed 's/^..//; s/ .*//'); | |
do echo "$(git log -1 --pretty='%Cgreen%ci %Cblue(%cr)%Creset ' $k) $k"; | |
done | sort -r; | |
} | |
# mysql Aliases | |
alias mysql=/usr/local/mysql/bin/mysql | |
alias mysqladmin=/usr/local/mysql/bin/mysqladmin | |
# spm - see https://wiki.spotify.net/wiki/NPM#Using_the_Internal_NPM_Repository | |
#alias spm="npm -reg http://npm-registry.spotify.net -userconfig ~/.spmrc --always-auth=true" | |
# Run a cool animation | |
# ~/demoz/logo | |
# Go path | |
export GOPATH=$HOME/gocode | |
export PATH="$GOPATH/bin:$PATH" | |
export EDITOR=vim | |
## Oct 20 2014, Killed this | |
# export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Users/montag/gocode/bin:/Applications/Postgres.app/Contents/MacOS/bin:~/bin:/usr/local/sbin:/usr/local/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/local/munki | |
#export PATH="/opt/X11/bin:/usr/local/git/bin:/usr/local/munki:$PATH" | |
# # Java Home path | |
# # see https://ghe.spotify.net/apollo/apollo/wiki/Apollo-User-Guide#prerequisites | |
# export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home | |
# # May 4, 2015 Installed Java 1.8 for hubview app with Joel Ek | |
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) | |
export PATH=$JAVA_HOME/bin:$PATH | |
# Disabled Jan 30, 2019. Re-enabled Feb 4, 2019. | |
# # Docker | |
# # export DOCKER_HOST="tcp://127.0.0.1:2375" | |
# # export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
# Disabled May 15, 2018. | |
# Aug 10, 2014 Ignore stupid clang error | |
# see http://bruteforce.gr/bypassing-clang-error-unknown-argument.html | |
export ARCHFLAGS='-Wno-error=unused-command-line-argument-hard-error-in-future' | |
# Dec 4, 2014 Add some cool gist aliases for Github Enterprise | |
# https://major.io/2014/08/08/use-gist-gem-github-enterprise-github-com/ | |
alias gist="gist -c" | |
# alias workgist="GITHUB_URL=https://ghe.spotify.net gist -c" | |
alias workgist="GITHUB_URL=https://git.musta.ch" | |
# Private diff gist | |
alias gistd='gist -p -f patch.diff' | |
PATH="/Users/montag/perl5/bin${PATH+:}${PATH}"; export PATH; | |
PERL5LIB="/Users/montag/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB; | |
PERL_LOCAL_LIB_ROOT="/Users/montag/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT; | |
PERL_MB_OPT="--install_base \"/Users/montag/perl5\""; export PERL_MB_OPT; | |
PERL_MM_OPT="INSTALL_BASE=/Users/montag/perl5"; export PERL_MM_OPT; | |
# # Jan 20, 2016 Add GNU coreutils to path. Disabled: breaks `ln` | |
# export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" | |
# Disabled Jan 30, 2019. | |
# Jan 1, 2017. grep stuff... | |
export GREP_OPTIONS='--color=auto' | |
export GREP_COLOR='1;32' | |
# Jun 6, 2017. Enable CCACHE for faster Xcode builds | |
export USE_CCACHE=1 | |
# Apr 1, 2018. Enable CCACHE according to core build instructions | |
# https://ghe.spotify.net/spotify-sdk/client-core/blob/master/BUILDING.md#ccache | |
export PATH="/usr/local/opt/ccache/libexec:$PATH" | |
# # May 4, 2018. Setting up environment variables for Oculus Go/Android Studio development. | |
# # https://developer.oculus.com/documentation/mobilesdk/latest/concepts/mobile-studio-setup-android/ | |
# export ANDROID_HOME="~/Library/Android/sdk" | |
# export ANDROID_NDK_HOME="~/Library/Android/sdk/ndk-bundle" | |
# Disabled Jan 30, 2019. | |
# Jan 30, 2019. Airbnb shellhelper, errors ignored. | |
source ~/.airlab/shellhelper.sh 2> /dev/null | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
# Mar 30, 2020. Suppress warning | |
export BASH_SILENCE_DEPRECATION_WARNING=1 | |
# Apr 23, 2020. Prefix path of Homebrew installed Ruby | |
export PATH="/usr/local/opt/ruby/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment