Skip to content

Instantly share code, notes, and snippets.

@karl-gustav
Last active March 23, 2017 11:43
Show Gist options
  • Save karl-gustav/e395796145480b5b76d79f7d6a3285a1 to your computer and use it in GitHub Desktop.
Save karl-gustav/e395796145480b5b76d79f7d6a3285a1 to your computer and use it in GitHub Desktop.
2017-03-23 Config files osX
# Git
alias hist='git hist'
alias st='git status'
alias gk='gitk &'
alias gka='gitk --all &'
alias arcdiff='arc diff'
alias arccreate="arc diff --create --reviewers '#ghostbusters'"
# Other
alias ll='ls -lh'
alias la='ls -a'
alias rmr='rm -rf'
alias bc='bc -l'
alias ss='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias prettyjson='python -m json.tool'
alias copy=pbcopy
alias ref='git rev-parse HEAD |tr -d "\n" | pbcopy'
if [ -r /etc/bashrc ]; then
. /etc/bashrc
fi
#git stuff
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
#make $(__git_ps1) available
if [ -f ~/.git-prompt.sh ]; then
. ~/.git-prompt.sh
fi
# Enable custom aliases
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# bash-completion
if [ -f /usr/local/etc/profile.d/bash_completion.sh ]; then
. /usr/local/etc/profile.d/bash_completion.sh
fi
#PATH updates
export PATH=~/bin\
:$(brew --prefix coreutils)/libexec/gnubin\
:~/src/google_appengine\
:$(brew --prefix node)/libexec/npm/bin\
:~/gae-sdk\
:~/go/bin\
:$PATH
export MANPATH=/usr/local/opt/coreutils/libexec/gnuman:$MANPATH
export PYTHONPATH=$PYTHONPATH:~/bin/
export GOPATH=$(go env GOPATH)
GREEN='\[\033[01;32m\]'
YELLOW='\[\033[01;33m\]'
MAGENTA='\[\033[01;35m\]'
WHITE='\[\033[01;37m\]'
RESET='\[\033[00m\]'
PS1="$GREEN\t $YELLOW\w$MAGENTA\$(__git_ps1)$WHITE\n\$$RESET "
#history settings
shopt -s histappend #Don't overwrite when closing multiple sessions
export HISTSIZE=100000 #Store X number of history lines
# mkdir, cd into it
mkcd () {
mkdir -p "$*"
cd "$*"
}
# Fix for encoding error in aws (use aws s3 ls to provoke the errro)
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Have date in history
HISTTIMEFORMAT="%y.%m.%d %T "
# Github application token (used so homebrew can search github more frequently)
export HOMEBREW_GITHUB_API_TOKEN=be02e041f3115b0beff75c8c139d4b5695f8be04
# set title when showing prompt
PROMPT_COMMAND='echo -ne "\033]0;"$(basename "$PWD")"\007"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment