Last active
November 7, 2017 22:27
-
-
Save lilrogalski/b0f0177b4dfb08bb770f2d6bce0f0a91 to your computer and use it in GitHub Desktop.
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
alias be='bundle exec' | |
alias bi='bundle install' | |
alias esl='ember serve --environment=local' | |
alias gb='git branch' | |
alias gc='git checkout' | |
alias gcm='git checkout master' | |
alias gcp='git cherry-pick' | |
alias gp='git pull' | |
alias gpr='git pull --rebase' | |
alias gri='git rebase -i' | |
alias gs='git status' | |
alias gl='git log' | |
alias code='pbpaste | highlight --syntax=js -O rtf | pbcopy' | |
alias npg='NODE_ENV=production gulp' | |
alias npc='NODE_ENV=production gulp compress' | |
alias bp='subl . ~/.bash_profile' | |
alias mp='be middleman build && be middleman sync' | |
alias vidsync='aws s3 sync build/ s3://vidme-react --acl public-read' | |
# . ~/.nvm/nvm.sh | |
# [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
# export NVM_DIR="/Users/ryanr/.nvm" | |
# export NVM_DIR="${HOME}/.nvm" | |
# [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
# nvm use stable | |
eval "$(rbenv init -)" | |
export EDITOR="subl -w" | |
export STORE_DATABASE_PASSWORD=password | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
if [ `rbenv version-name` = "2.2.3" ]; then | |
unset RUBY_FREE_MIN | |
unset RUBY_HEAP_MIN_SLOTS | |
fi | |
PS1='\u \w \$ ' | |
reduce-path() { | |
local path=${1-$PWD} target=${2-33} IFS=/ | |
[[ "$path" =~ ^$HOME(/|$) ]] && path="~${path#$HOME}" | |
[[ ${#path} -le $target ]] && echo "$path" && return | |
local order=$((i=0; for e in $path; do echo ${#e} $i; ((i++)); done) | | |
head -n-1 | sort -rn | cut -d " " -f 2) | |
local elements=($path) | |
IFS=$'\n' | |
for i in $order; do | |
elements[i]=${elements[i]:0:1} | |
IFS=/ | |
path="${elements[*]}" | |
[[ ${#path} -le $target ]] && echo "$path" && return | |
done | |
echo "${path:0:target/2}~${path: -target/2}" | |
} | |
PROMPT_COMMAND=PROMPT_COMMAND; PROMPT_COMMAND() { | |
local retval=$? | |
local path=$(reduce-path) | |
local n=$(ls -A1 | wc -l) | |
local b=$(git branch 2>/dev/null | sed 's/^\* \(.*\)/\1/p;d') | |
PS1="\[\e[01;32m\]\u@\h\[\e[00m\] " | |
if [ "$TERM" = "xterm" ]; then | |
PS1+="\[\e]2;\u@\H \w\a\]" | |
fi | |
if [ -n "$b" ]; then | |
PS1+="\[\e[01;33m\][$b]\[\e[00m\] " | |
fi | |
PS1+="\[\e[01;34m\]$path\[\e[00m\] " | |
if [ "$retval" -ne 0 ]; then | |
PS1+="\[\e[01;31m\]¡$retval!\[\e[00m\] " | |
fi | |
PS1+="\\\$ " | |
} | |
### Added by the Heroku Toolbelt | |
export PATH="/usr/local/heroku/bin:$PATH" | |
export PATH=$PATH:/usr/local/bin:/usr/local/lib/node_modules:/usr/local/share/npm/bin | |
export PATH="$HOME/.yarn/bin:$PATH" | |
export PATH=~/Library/Python/2.7/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment