Skip to content

Instantly share code, notes, and snippets.

@sohlis
Created August 24, 2014 23:49
Show Gist options
  • Save sohlis/7885e07830db5f85b182 to your computer and use it in GitHub Desktop.
Save sohlis/7885e07830db5f85b182 to your computer and use it in GitHub Desktop.
Sohlis Corporation Officially Licensed DotFiles
# Set Default Editor (change 'Nano' to the editor of your choice)
export EDITOR=/usr/bin/nano
alias edit='subl' #open in sublimetext when type edit
#some simple ones
alias cx='cd | ls'
alias ..='cd ..'
alias serve='python -m SimpleHTTPServer'
#git aliases
alias gs='git status'
alias gaa='git add --all'
alias gc='git commit -m'
alias gpom='git push origin master'
alias grevert='git checkout -- .'
test -f ~/.git-completion.bash && . $_ #git autocomplete
#jekyll aliases
alias js='jekyll serve -w'
alias jb='jekyll build'
#start in Desktop
cd ~/Desktop
#charles edits
function node_env() {
echo "$NODE_ENV"
}
function parse_git_branch() {
x=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'`
if [[ "$x" == "" ]]; then
echo "(no git) "
else
echo "$x "
fi
}
export PROMPT_COMMAND='export OLD_STATUS=$?'
export PS1='\n\[\033[0;37m\]\t \[\033[0;33m\]\u@\[\033[0;33m\]\h\[\033[0;33m\]\w \[\033[0;36m\]`parse_git_branch`env:`node_env` \[\033[0;32m\]`if [ $OLD_STATUS = 0 ]; then echo \👌; else echo \👎; fi` \n\[\033[0;37m\]> \[\033[0m\]'
export PS2='> '
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
function settitle() { echo -n -e "\033]0;$@\007"; }
function cd() { command cd "$@"; settitle `pwd -P`; }
settitle `pwd`
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
#☀☁
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment