Skip to content

Instantly share code, notes, and snippets.

@alexdmejias
Created May 14, 2014 03:55
Show Gist options
  • Save alexdmejias/b9ee4cdb0f0910c52188 to your computer and use it in GitHub Desktop.
Save alexdmejias/b9ee4cdb0f0910c52188 to your computer and use it in GitHub Desktop.
# Reset
off='\033[0m' # Text Reset
# Regular Colors
black='\033[0;30m' # Black
red='\033[0;31m' # Red
green='\033[0;32m' # Green
yellow='\033[0;33m' # Yellow
blue='\033[0;34m' # Blue
purple='\033[0;35m' # Purple
cyan='\033[0;36m' # Cyan
white='\033[0;37m' # White
# Bold
Black='\033[1;30m' # Black
Red='\033[1;31m' # Red
Green='\033[1;32m' # Green
Yellow='\033[1;33m' # Yellow
Blue='\033[1;34m' # Blue
Purple='\033[1;35m' # Purple
Cyan='\033[1;36m' # Cyan
White='\033[1;37m' # White
# Underline
_black_='\033[4;30m' # Black
_red_='\033[4;31m' # Red
_green_='\033[4;32m' # Green
_yellow_='\033[4;33m' # Yellow
_blue_='\033[4;34m' # Blue
_purple_='\033[4;35m' # Purple
_cyan_='\033[4;36m' # Cyan
_white_='\033[4;37m' # White
# Background
on_black='\033[0;40m' # Black
on_red='\033[0;41m' # Red
on_green='\033[0;42m' # Green
on_yellow='\033[0;43m' # Yellow
on_blue='\033[0;44m' # Blue
on_purple='\033[0;45m' # Purple
on_cyan='\033[0;46m' # Cyan
on_white='\033[0;47m' # White
# High Intensty
bLACK='\033[0;90m' # Black
rED='\033[0;91m' # Red
gREEN='\033[0;92m' # Green
yELLOW='\033[0;93m' # Yellow
bLUE='\033[0;94m' # Blue
pURPLE='\033[0;95m' # Purple
cYAN='\033[0;96m' # Cyan
wHITE='\033[0;97m' # White
# Bold High Intensty
BLACK='\033[1;90m' # Black
RED='\033[1;91m' # Red
GREEN='\033[1;92m' # Green
YELLOW='\033[1;93m' # Yellow
BLUE='\033[1;94m' # Blue
PURPLE='\033[1;95m' # Purple
CYAN='\033[1;96m' # Cyan
WHITE='\033[1;97m' # White
# High Intensty backgrounds
on_BLACK='\033[0;100m' # Black
on_RED='\033[0;101m' # Red
on_GREEN='\033[0;102m' # Green
on_YELLOW='\033[0;103m' # Yellow
on_BLUE='\033[0;104m' # Blue
on_PURPLE='\033[10;95m' # Purple
on_CYAN='\033[0;106m' # Cyan
on_WHITE='\033[0;107m' # White
export EDITOR='subl -w'
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export PATH="/usr/local/sbin:$(brew --prefix josegonzalez/php/php54)/bin:/usr/local/heroku/bin:~/bin:$PATH"
PATH=${PATH}
export GHI_TOKEN="6b6a8ab174cdcf948076f1752d0624b75cdb4942"
export PATH=/Applications/MAMP/bin/php/php5.4.4/bin:$PATH
# source ~/.bash/git-prompt
source ~/.colors
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
date_line="\n\[${on_red}\]\[${White}\] \d - \t \[${off}\]"
current_location_line="\n\[${on_cyan}\]\[${White}\] \w \[${off}\] \[${YELLOW}\]\$(parse_git_branch)\[${off}\]\n"
none='\033[0m'
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="$date_line$current_location_line\[$none\]\[$on_blue\] ➜ \[$none\] "
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
alias s="subl"
alias alises="subl ~/.bash_profile"
#reload
alias reload=". ~/.bash_profile && echo 'realoded!'"
# https://gist.github.com/JeffreyWay/af0ee7311abfde3e3b73
alias lamp="curl -L -o 'install.sh' http://bit.ly/1hBfq57 && curl -L -o 'Vagrantfile' http://bit.ly/1mE3Qt9 && vagrant up"
[[ -s /Users/alex/.nvm/nvm.sh ]] && . /Users/alex/.nvm/nvm.sh # This loads NVM
# {{{
# Node Completion - Auto-generated, do not touch.
shopt -s progcomp
for f in $(command ls ~/.node-completion); do
f="$HOME/.node-completion/$f"
test -f "$f" && . "$f"
done
# }}}
export PATH="$HOME/.composer/vendor/bin:$PATH"
export PATH=${PATH}:/Users/alex/Desktop/adt-bundle-mac-x86_64-20140321/sdk/platform-tools
export PATH=$PATH:/Applications/MAMP/Library/bin
function toggleiTerm() {
pb='/usr/libexec/PlistBuddy'
iTerm='/Applications/iTerm.app/Contents/Info.plist'
echo "Do you wish to hide iTerm in Dock?"
select ync in "Hide" "Show" "Cancel"; do
case $ync in
'Hide' )
$pb -c "Add :LSUIElement bool true" $iTerm
echo "relaunch iTerm to take effectives"
break
;;
'Show' )
$pb -c "Delete :LSUIElement" $iTerm
echo "run killall 'iTerm' to exit, and then relaunch it"
break
;;
'Cancel' )
break
;;
esac
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment