Skip to content

Instantly share code, notes, and snippets.

@fidiego
Last active May 24, 2016 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fidiego/a1b0c97fe8cbde19b0ff21443cff0d2e to your computer and use it in GitHub Desktop.
Save fidiego/a1b0c97fe8cbde19b0ff21443cff0d2e to your computer and use it in GitHub Desktop.
commonly used dotfiles
[core]
whitespace = space-before-tab,trailing-space,cr-at-eol
ignorecase = false
[diff]
renames = copy
[pack]
threads = 0
[push]
default = simple
[credential]
helper = osxkeychain
[user]
name = Fred Diego
email = fred.diego@buzzfeed.com
[alias]
br = branch
ci = commit
co = checkout
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%an, %cr)%Creset' --abbrev-commit --date=relative --topo-order
st = status -sb
up = fetch --all --prune
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
pup = !git fetch --all --prune && git pull
[color]
ui = auto
# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
bind left:ctrl;alt throw next
bind right:ctrl;alt throw next
# Resize Bindings
## Full Screen
bind m:cmd;alt;ctrl push right bar-resize:screenSizeX
## Half Size
bind right:cmd;alt;ctrl push right bar-resize:screenSizeX/2
bind left:cmd;alt;ctrl push left bar-resize:screenSizeX/2
bind down:cmd;alt;ctrl push down bar-resize:screenSizeY/2
bind up:cmd;alt;ctrl push up bar-resize:screenSizeY/2
## Quarter Size
bind right:cmd;alt;shift corner bottom-right resize:screenSizeX/2;screenSizeY/2
bind left:cmd;alt;shift corner top-left resize:screenSizeX/2;screenSizeY/2
bind down:cmd;alt;shift corner bottom-left resize:screenSizeX/2;screenSizeY/2
bind up:cmd;alt;shift corner top-right resize:screenSizeX/2;screenSizeY/2
export PATH="/usr/local/bin:$PATH"
export PATH="/buzzfeed/bin:$PATH"
export PATH="/buzzfeed/local/bin:$PATH"
export PATH="~/bin:$PATH"
export PATH="/usr/local/go/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
export EDITOR="/usr/bin/vim"
# add sublime text
export PATH="/Applications/Sublime Text.app/Contents/SharedSupport/bin/:$PATH"
# add postgres.app
export PATH="/Applications/Postgres.app/Contents/Versions/9.4/bin/:$PATH"
# virtual env stuff
source /usr/local/bin/virtualenvwrapper.sh
# system stuff aliases
alias la='ls -A'
alias lt='ls -Alth'
alias ltr='ls -Altrh'
alias ll='ls -lA'
alias c='clear '
alias cl='clear && ls -A'
alias cll='clear && ls -lA'
alias ..='cd .. '
alias ...='cd ../.. '
alias srcbp='source ~/.bash_profile'
alias allusers='cut -d: -f1 /etc/passwd'
# git stuff aliases
alias gtst='git status '
alias gtdf='git diff '
alias branch='git rev-parse --abbrev-ref HEAD'
# python, ipython
alias ipy='ipython '
alias pyserve='python -m SimpleHTTPServer '
# beep
alias beep='tput bel'
# application shortcuts
alias chrome='open -a "Google Chrome" '
# color definitions (safer and neater than raw values)
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m' # Black - Background
bakred='\e[41m' # Red
bakgrn='\e[42m' # Green
bakylw='\e[43m' # Yellow
bakblu='\e[44m' # Blue
bakpur='\e[45m' # Purple
bakcyn='\e[46m' # Cyan
bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset
# directory colors
export CLICOLOR=1
export LSCOLORS='gxBxhxDxfxhxhxhxhxcxcx'
# git aware jazz
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source "${GITAWAREPROMPT}/main.sh"
# bash prompt
export PS1="\[$txtpur\]\D{%d-%m-%Y}\[$txtrst\] :: \[$txtylw\]\t\[$txtrst\] \[$bldcyn\]\$git_branch\[$txtrst\]\[$bldred\]\$git_dirty\[$txtrst\]
\[$txtgrn\]\u\[$txtrst\]@\[$txtcyn\]\h\[$txtrst\] \w
\[$bldgrn\]>> \[$txtrst\]"
# autocomplete
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
ulimit -n 2048
# PaperTrail
function pt() { papertrail -f $* | lnav; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment