Skip to content

Instantly share code, notes, and snippets.

@mr-feek
Created December 12, 2015 00:28
Show Gist options
  • Save mr-feek/78320e2e2d186b068e1f to your computer and use it in GitHub Desktop.
Save mr-feek/78320e2e2d186b068e1f to your computer and use it in GitHub Desktop.
#!/bin/bash:w
alias grep='grep --color=auto'
alias plz='sudo !!'
alias ns='node server.js'
alias bi='bower install'
alias ls='ls -GFha'
#git
alias gs='git status'
alias gb='git branch'
alias gd='git diff'
alias gc='git checkout'
alias ga='git add'
alias gp='git pull'
alias gm='git merge'
alias gl='git log --graph'
alias oops='git commit --amend --no-edit'
alias forget='git rm -r --cached'
alias cleardns='sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed'
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
#git autocomplete
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
#export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
export PS1="\n----------------\n\[\033[0;91m\]\W\[\033m\]\[\033[32m\]\$(parse_git_branch)\[\033[00m\]\[\033[0;37m\] $ \[\033[0m\]"
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
function cs()
{
if [ $# -eq 0 ]; then
cd && ls
else
cd "$*" && ls
fi
}
#cd then ls
alias cd='cs'
export PATH="$PATH:$HOME/.composer/vendor/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment