Skip to content

Instantly share code, notes, and snippets.

@epicserve
epicserve / example_command.py
Created October 30, 2013 17:05
Example of how to setup logging for a Django management command.
from django.core.management.base import BaseCommand
from mymodule import main
import logging
class Command(BaseCommand):
help = 'Do foo'
def handle(self, *args, **options):
@alq666
alq666 / pgsnap.py
Created June 18, 2012 03:52
xfs-freeze + ebs snapshots
import boto
import logging
import os
import time
import subprocess
import sys
import urllib2
logger = logging.getLogger("pgbackup")
logger.addHandler(level=logging.INFO, logging.handlers.SysLogHandler(facility=logging.handlers.SysLogHandler.LOG_LOCAL0))
@oppianmatt
oppianmatt / bitbucket.py
Created May 29, 2012 13:08 — forked from sharoonthomas/bitbucket.py
Script to display all issues in all projects/repositories of bitbucket
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Get all your bitbucket issues at once-Fetches/Displays your bitbucket issues
-
:copyright: (c) 2011 by Openlabs Technologies & Consulting (P) Limited
:license: BSD, see LICENSE for more details.
-
The username and password for this program can be set in multiple ways.
-
1. Set environment variable