Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
.bash_profile as of 2013/07/25
#####################################################################################
# PATH
#####################################################################################
export ZGTC_OTHER="$HOME/.composer/bin"
export PATH="$PATH:$ZGTC_OTHER"
export ZGTC_GRUNT="/usr/local/share/npm/lib/node_modules/grunt-cli/bin/grunt"
export PATH="$ZGTC_GRUNT:$PATH"
export ZGTC_NPM="/usr/local/share/npm/bin"
export PATH="$ZGTC_NPM:$PATH"
export ZGTC_BIN="~/bin"
export PATH="$ZGTC_BIN:$PATH"
export homebrew="/usr/local/bin:/usr/local/sbin"
export PATH="$homebrew:$PATH"
export PATH="/usr/local/heroku/bin:$PATH"
export RBENV_ROOT=/usr/local/var/rbenv
export WP_CLI_PHP=/Applications/MAMP/bin/php/php5.3.20/bin/php
export NVM_DIR="/Users/zgtc/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
#####################################################################################
# PROMPT
#####################################################################################
# print rvm, git branch, git status to the prompt, by emili parreño @eparreno
show_rvm_version() {
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
[ "$gemset" != "" ] && gemset="@$gemset"
local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}')
[ "$version" != "" ] && version="$version"
local full="$version$gemset"
[ "$full" != "" ] && echo "$full"
}
show_git_dirty() {
local git_status=$(git status 2>&1 | tail -n1)
[[ $git_status != "fatal: Not a git repository (or any of the parent directories): .git" ]] && [[ $git_status != "nothing to commit (working directory clean)" ]] && echo " *"
}
show_git_branch() {
_branch="$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')"
test -n "$_branch" && echo -e " $_branch"
}
show_dev_info() {
echo "($(show_rvm_version)$(show_git_branch)$(show_git_dirty))"
}
# Colors
Black='\e[0;30m'
Red='\e[0;31m'
Green='\e[0;32m'
Yellow='\e[0;33m'
Blue='\e[0;34m'
Purple='\e[0;35m'
Cyan='\e[0;36m'
White='\e[0;37m'
# set the PS1 variable
export PS1="\[$Green\]\w \[$Yellow\]\$(show_dev_info)\[$Black\]$ "
# show folder name in terminal tab
# http://superuser.com/questions/79972/set-the-title-of-the-terminal-window-to-the-current-directory
# Unicode chars not supported
PROMPT_COMMAND='echo -ne "\033]0; ${PWD##*/}\007"'
#####################################################################################
# BASH COMPLETION
#####################################################################################
if [[ -s "/usr/local/Cellar/git/1.7.3.2/etc/bash_completion.d/git-completion.bash" ]]; then
source "/usr/local/Cellar/git/1.7.3.2/etc/bash_completion.d/git-completion.bash"
fi
source $HOME/.composer/vendor/wp-cli/wp-cli/utils/wp-completion.bash
#####################################################################################
# ALIASES
#####################################################################################
export EDITOR="subl -w"
# paths
alias myapache='cd /opt/local/apache2/htdocs/cake'
alias projectes='cd ~/Documents/docs\ sergi/webs/projectes/'
alias profile='s ~/.bash_profile'
alias fuck='sudo $(history -p \!\!)' # add sudo to last command
# console
alias cl="clear"
alias host="subl /etc/hosts"
alias s="subl ."
alias cw="compass watch"
# DNSmasq
alias masq="sudo launchctl stop homebrew.mxcl.dnsmasq && sudo launchctl start homebrew.mxcl.dnsmasq"
alias masqoff="sudo launchctl stop homebrew.mxcl.dnsmasq"
#weinre
alias weinreall="weinre -boundHost -all-"
# Install grunt plugins from package.json and save to devDependencies
alias npmdev="npm install --save-dev"
# git
alias gs="git status"
#alias gl="git log --oneline --abbrev-commit --decorate --color"
alias gl="git log --graph --pretty=format:'%Cgreen%h%Creset -%Creset %s%C(yellow)%d %Cblue(%aN, %cr)%Creset' --abbrev-commit --date=relative"
alias gall="git add ."
alias gam="git commit -am"
alias gpom="git push origin master"
alias gphm="git push heroku master"
alias gpwm="git push web master"
alias gpbm="git push backup master"
alias gc="git checkout"
alias gb="git branch"
alias gy="git log --oneline --abbrev-commit --decorate --color --since=yesterday"
alias gw="git log --oneline --abbrev-commit --decorate --color --since=1.week"
alias gg="git log --oneline --abbrev-commit --branches=* --graph --decorate --color"
#svn
alias sc='svn ci -m '
alias sp="svn up"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.