Skip to content

Instantly share code, notes, and snippets.

View jsummerfield's full-sized avatar

James Summerfield jsummerfield

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jsummerfield on github.
  • I am jsummerfield (https://keybase.io/jsummerfield) on keybase.
  • I have a public key whose fingerprint is 8CF6 D9C0 1EF0 7433 0BCB 152B 225B 2D8C 52BA 1940

To claim this, I am signing this object:

@jsummerfield
jsummerfield / cleanup.py
Created June 3, 2012 18:59
Clean and organise Downloads
#!/usr/bin/env python
import os
import time
SOURCE = '/Users/james/Downloads/'
DESTINATION = '/Users/james/Desktop/Stuff/'
DIRECTORIES = 'Directories'
MTIME_WAIT = 300 # seconds
@jsummerfield
jsummerfield / gist:1486891
Created December 16, 2011 17:00
Amazon SES SMTP support for Django
"""
Django's SMTP EmailBackend doesn't support an SMTP_SSL connection necessary to interact with Amazon SES's newly announced SMTP server. We need to write a custom EmailBackend overriding the default EMailBackend's open(). Thanks to https://github.com/bancek/django-smtp-ssl for the example.
"""
--- settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com'
EMAIL_PORT = 465
EMAIL_HOST_USER = 'username'