Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Do work
# Git aliases
alias gs="git status -sb"
alias ga="git add"
alias gc="git commit -m"
alias gd="git diff"
alias gds="git diff --staged"
alias gl='git log --pretty=format:"%C(yellow)%h %Cgreen %an %x09 %Creset %s %Cblue (%cr)"'
alias gv="git branch -v"
# Logs
alias nlog="sudo tail /var/log/nginx/error.log"
alias alog="sudo tail /var/log/apache2/error.log"
# Vim mode
set -o vi
# History timestamp
# Language settings
export NODE_PATH=/usr/local/lib/node_modules
export JAVA_HOME=$(/usr/libexec/java_home)
export MAVEN_OPTS="-Xmx1024M -XX:MaxPermSize=512M$JAVA_HOME/jre/lib/security/cacerts"
export GOPATH="$HOME/gopath"
export PATH="$GOPATH/bin:$PATH"
# Git branch in prompt
__git_ps1 ()
local b="$(git symbolic-ref HEAD 2>/dev/null)";
if [ -n "$b" ]; then
printf " (%s)" "${b##refs/heads/}";
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[1;31m\]$(__git_ps1 " (%s)")\[\033[00m\]\$ '
# Mac
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
# Linux
export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.