Skip to content

Instantly share code, notes, and snippets.

@jareware
Created March 11, 2014 12:08
Show Gist options
  • Save jareware/9484354 to your computer and use it in GitHub Desktop.
Save jareware/9484354 to your computer and use it in GitHub Desktop.
Personal dotfiles dump.
#!/bin/bash
# Enable "**/*.js" style globs:
shopt -s globstar
# Set PATH so it includes user's private bin if it exists:
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# Add more important things to PATH:
PATH="$PATH:/usr/local/bin"
PATH="$PATH:/usr/local/share/npm/bin"
PATH="/usr/local/heroku/bin:$PATH"
PATH="$PATH:$HOME/.rvm/bin"
# Set up git prompt & autocompletion:
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh
# http://nathanhoad.net/git-bash-tab-completions-and-a-cool-prompt (slightly modified):
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\[\e[36;1m\]\w\[\e[0m\] $(__git_ps1 "[\[\e[0;32m\]%s\[\e[0m\]\[\e[0;33m\]$(parse_git_dirty)\[\e[0m\]]")\$ \[\e[0m\]'
# Shell aliases:
alias dev-browser="/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --disable-web-security &"
alias gitk="/usr/local/bin/gitk --all 2>/dev/null &"
# https://github.com/ndbroadbent/scm_breeze
[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh"
# Increase the limit of max file handles (grunt watch for large projects):
ulimit -n 2048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment