Skip to content

Instantly share code, notes, and snippets.

View schwuk's full-sized avatar

David M. schwuk

View GitHub Profile
@schwuk
schwuk / Preferences.sublime-settings
Created November 8, 2012 15:23
Sublime Text 2 user preferences
// Settings in here override those in "Default/Preferences.sublime-settings", and
// are overridden in turn by file type specific settings.
{
"font_face": "Ubuntu Mono",
"font_size": 10,
"rulers": [80],
"translate_tabs_to_spaces": true,
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_minimap_border": true,
"highlight_line": true,
@schwuk
schwuk / forms.py
Created May 18, 2012 13:30
Including Email in the Django UserCreationForm
from django.forms import EmailField
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
class UserCreationForm(UserCreationForm):
email = EmailField(label=_("Email address"), required=True,
@schwuk
schwuk / manage.py
Created April 17, 2012 12:39
Django manage.py for split settings.
#!/usr/bin/env python
import os
import sys
from django.core.management import execute_manager
PRODUCTION = 'production'
DEVELOPMENT = 'development'
ENVIRONMENTS = [
@schwuk
schwuk / lp2pt
Created August 10, 2010 13:40
Simple script to slurp bugs from a Launchpad project into Pivotal Tracker stories.
#! /usr/bin/python
"""
Simple script to slurp bugs from a Launchpad project into Pivotal Tracker
stories.
Also useful as an example of using launchpadlib and pytracker.
"""
import sys