Skip to content

Instantly share code, notes, and snippets.

@JonJanzen
JonJanzen / auto_nose.py
Created October 11, 2012 21:38
Django auto reloader modified to run nose tests every time a file is saved
# Autoreloading launcher.
# Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org).
# Some taken from Ian Bicking's Paste (http://pythonpaste.org/).
#
# Portions copyright (c) 2004, CherryPy Team ([email protected])
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
@JonJanzen
JonJanzen / ddns.py
Created August 23, 2012 04:26
Dynamic DNS on WebFaction
#!/usr/bin/python
# Use this script to update a DNS override using the webfaction API
# be sure to set your username, password, dns override, and ethenet interface.
# Then add a crontab entry for the script, I use every 5 minutes
# */5 * * * * /path/to/ddns.py
# This is safe as the script exit(0)'s if the ip is the same as wehat is recorded in the file.
# Webfaction documentation on DNS overrides
# http://docs.webfaction.com/user-guide/domains.html#overriding-dns-records-with-the-control-panel
@JonJanzen
JonJanzen / .vimrc
Created May 17, 2012 22:36
Jon's vimrc
" seach settings
set incsearch ignorecase hlsearch
" Press space to clearsearch highlighting and any message already displayed.
nnoremap <silent> <Space> :silent noh<Bar>echo<CR>
" Tab settings
set shiftwidth=4 softtabstop=4
set tabstop=4
set shiftwidth=4
set expandtab