Skip to content

Instantly share code, notes, and snippets.

Djangonaut, tree hugger

Scot Hacker shacker

Djangonaut, tree hugger
View GitHub Profile
shacker / pg_backup
Created Mar 5, 2014
Get list of all dbs on remote server, dump each to its own dir on this server
View pg_backup
# Get list of all dbs on remote server, dump each to its own dir on this server
export PGPASSWORD="secret"
shacker /
Created Feb 27, 2014
Template name overlays for Django
from django.template.loader import BaseLoader
from django.template.loader import find_template_loader
from django.template.loader import make_origin
from django.template.base import TemplateDoesNotExist
from django.template.base import Template
Deubug template loader visually shows which templates are being invoked in the
process of rendering an entire page. To use, wrap your your existing loaders
shacker / add_members-nomail
Created Oct 20, 2012
Provides an -e flag to Mailmans' 2.x add_members script for nomail delivery option
View add_members-nomail
> --enable-mail=<y|n>
> -e <y|n>
> Enable user mail deilvery options.
> from Mailman import MemberAdaptor
< def addall(mlist, members, digest, ack, outfp):
> def addall(mlist, members, digest, ack, outfp, enable):
shacker /
Created Dec 5, 2010
Replace "drawing names from a hat" gift exchanges with a quick script
Python-based gift exchange randomizer.
Step through a list of people and, for each member of that list,
select someone else to be a recipient of their gift. That recipient:
A) Must not be themselves (no self-gifting)
B) Must not already have been assigned as a recipient