Skip to content

Instantly share code, notes, and snippets.

View zackdever's full-sized avatar

Zack Dever zackdever

View GitHub Profile
@zackdever
zackdever / .vimrc
Created September 23, 2011 03:09
.vimrc for ubuntu
""" Vundle """""""""""""""""""""""""""""""""""""""""""""
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@zackdever
zackdever / string_collapse.py
Created October 4, 2011 00:18
python string collapse - removes white space at beginning and end of lines and replace newline with a single space
# source: http://stackoverflow.com/questions/1249786/is-there-a-string-collapse-library-function-in-python
' '.join(multilineinput.split())
@zackdever
zackdever / extend_with_local_settings.py
Created October 4, 2011 01:14
extend django settings.py variables in local_settings.py
# source: http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/
# settings.py
try:
LOCAL_SETTINGS
except NameError:
try:
from local_settings import *
except ImportError:
pass
@zackdever
zackdever / new-postgresql-db-and-user
Created January 18, 2012 04:06
create new postgresql db and user for use with django
sudo -u postgres createuser -P username
sudo -u postgres psql template1
CREATE DATABASE dbname OWNER username ENCODING ‘UTF8’;
@zackdever
zackdever / .gitignore_global
Created May 10, 2012 23:26
global gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc
@zackdever
zackdever / p5.desktop
Created June 4, 2012 21:32
Desktop Entry for Processing to play nicely with Gnome
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Processing
GenericName=Integrated Development Environment
Comment=Processing Integrated Development Environment
Exec=/opt/processing-1.5.1/processing %F
TryExec=/opt/processing-1.5.1/processing
Icon=/opt/processing-1.5.1/icon.png
StartupNotify=true
@zackdever
zackdever / bootstrap-ubuntu-precise.sh
Created June 4, 2012 22:59
Rough setup script to install my development tools for Ubuntu 12.04
#!/bin/sh
###
# A dirty script to roughly set up a development
# environment on a fresh Ubuntu install.
#
# This was built targeting Ubuntu 12.04 x64.
###
#TODO: fix root ownership issue on ~/.vim/ and others
@zackdever
zackdever / .profile
Created July 5, 2012 23:18
quick bash ~/.profile for demo macbook pro
# use local node packages
export PATH="./node_modules/.bin:$PATH"
# paint with all the colors of the wind
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# ref: http://www.ibm.com/developerworks/linux/library/l-tip-prompt/
export PS1="\u@\h \[\e[37m\]\W \[\e[36m\]$ \[\e[0m\]"
@zackdever
zackdever / .vimrc
Created July 6, 2012 03:46
.vimrc for mac
""" Vundle """""""""""""""""""""""""""""""""""""""""""""
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..