Skip to content

Instantly share code, notes, and snippets.

@jhaubrich
Created April 17, 2013 14:38
Show Gist options
  • Save jhaubrich/5404828 to your computer and use it in GitHub Desktop.
Save jhaubrich/5404828 to your computer and use it in GitHub Desktop.
zsh
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="nanotech"
#ZSH_THEME="pixelplastic"
DISABLE_AUTO_UPDATE="false"
plugins=(git django)
source $ZSH/oh-my-zsh.sh
# source ~/.git-completion.sh
unsetopt correct_all
# PATHS
export PATH=~/bin:/usr/bin:$PATH
export PATH=~/src/topojson/bin:$PATH
# export PATH=/usr/local/share/python:$PATH # brew python
export PATH=/usr/local/bin:/usr/local/sbin:~/src/tools/bin:$PATH # brew on osx
# export PATH=/Library/Frameworks/Python.framework/Versions/7.2/bin:$PATH # EPD OS X
export PYTHONPATH=~/src:~/src/tools/lib:$PYTHONPATH
export NODE_PATH="/usr/local/lib/node"
# py2cairo caveats: For non-homebrew Python, you need to amend your PYTHONPATH like so:
# export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
# git aliases
alias gs='git status -sb '
alias ga='git add '
alias gb='git branch '
alias gt='git branch -u'
alias grb='for remote in `git branch -r | grep -v master `; do git checkout --track $remote ; done' # thanks bj
# Always view diff before committing
alias gc='git commit --verbose'
alias gd='git diff'
alias go='git checkout'
alias gk='gitk --all&'
alias gx='gitx --all'
alias got='git '
alias get='git '
alias hit='git '
alias git-amend='git commit --amend -C HEAD'
# github defunkt/hubu
eval "$(hub alias -s)"
if [ "`uname`" = "Darwin" ];then
# export ORACLE_HOME=/usr/local/lib/oracle_64 # 64bit on Lion is crashy
export ORACLE_HOME=/usr/local/lib/oracle # 32bit
# export DYLD_LIBRARY_PATH=$ORACLE_HOME # homebrew doesn't like this
# export LD_LIBRARY_PATH=$ORACLE_HOME
# requires brew install coreutils --default-names
export PATH=$PATH:/usr/local/Cellar/coreutils/8.17/bin # gnu coreutils (prefixed with g)
eval $( gdircolors -b ~/src/dotfiles/dircolors.solarized.256dark )
alias ls='gls --color=auto'
alias ll='gls -lhf --color=auto'
# export VERSIONER_PYTHON_PREFER_32_BIT=yes # sets osx default python to 32bit
# export PROJ_DIR=/usr/local/Cellar/proj/4.8.0 # for basemap?
alias mkenv="mkvirtualenv -p /usr/local/bin/python"
fi
if [ "`uname`" = "Linux" ]; then
# Ubuntu Oracle stuff
# export ORACLE_HOME=/usr/lib/oracle/11.2/client64/
# export LD_LIBRARY_PATH=$ORACLE_HOME/lib:
# export PATH=$ORACLE_HOME/bin:$PATH
# filetype colors via https://github.com/trapd00r/LS_COLORS
eval $( dircolors -b ~/src/dotfiles/dircolors.solarized.256dark )
# Apple's pbcopy and paste
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
fi
# Arch
# fixes virtual console colors. Pair with a good .Xdefaults.
# credit: https://wiki.archlinux.org/index.php/Configure_virtual_console_colors
if [ "$TERM" = "linux" ]; then
_SEDCMD='s/.*\*color\([0-9]\{1,\}\).*#\([0-9a-fA-F]\{6\}\).*/\1 \2/p'
for i in $(sed -n "$_SEDCMD" $HOME/.Xdefaults | \
awk '$1 < 16 {printf "\\e]P%X%s", $1, $2}'); do
echo -en "$i"
done
clear
fi
export EDITOR='subl -w'
# export EDITOR='vim'
export PAGER=less
export LESS=-r
function cdw() {
cd `cdw.py "$@"`;}
django_website/wsmon [ ./manage.py <tab> master ] 9:36 AM
adminindex -- prints the admin-index template snippet for the given app
createcachetable -- creates the table needed to use the SQL cache backend.
dbshell -- runs the command-line client for the current DATABASE_ENGI
diffsettings -- displays differences between the current settings.py and D
dumpdata -- Output the contents of the database as a fixture of the gi
flush -- Executes ``sqlflush`` on the current database.
help -- manage.py help.
inspectdb -- Introspects the database tables in the given database and
loaddata -- Installs the named fixture(s) in the database.
reset -- Executes ``sqlreset`` for the given app(s) in the current
runfcgi -- Run this project as a fastcgi (or some other protocol supp
runserver -- Starts a lightweight Web server for development.
shell -- Runs a Python interactive interpreter.
sql -- Prints the CREATE TABLE SQL statements for the given app n
sqlall -- Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL s
sqlclear -- Prints the DROP TABLE SQL statements for the given app nam
sqlcustom -- Prints the custom table modifying SQL statements for the g
sqlflush -- Returns a list of the SQL statements required to return al
sqlindexes -- Prints the CREATE INDEX SQL statements for the given model
sqlinitialdata -- RENAMED: see 'sqlcustom'
sqlreset -- Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for
sqlsequencereset -- Prints the SQL statements for resetting sequences for the
startapp -- Creates a Django app directory structure for the given app
syncdb -- Create the database tables for all apps in INSTALLED_APPS
test -- Runs the test suite for the specified applications, or the
testserver -- Runs a development server with data from the given fixture
validate -- Validates all installed models.
django_website/wsmon [ ./manage.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment