Skip to content

Instantly share code, notes, and snippets.

@kyleturner
kyleturner / Remove Submodule
Created January 5, 2012 01:07
How to remove a submodule from a Github project
To remove a submodule you need to:
Delete the relevant line from the .gitmodules file.
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Commit and delete the now untracked submodule files.
@pcardune
pcardune / .gitignore
Created September 5, 2011 04:55
Facebook command-line client helper
.fb_access_token
.fbconsole.py
diff --git a/medley/playlist/tests/tests.py b/medley/playlist/tests/tests.py
index 56d7ca4..b350f56 100644
--- a/medley/playlist/tests/tests.py
+++ b/medley/playlist/tests/tests.py
@@ -15,6 +15,9 @@ from medley.playlist.models import Artist, Track, History, ArtistImage, Snapshot
from medley.playlist.trailer.amazon import AmazonTrailer
+class RequiresAMGTestCase(TestCase):
+ requires_databases = ['default', 'amgdb']
from threading import local
_blah = local()
class StopThatShit(Exception):
pass
def patch():
from django.db.backends import util
from django import template
@jacobian
jacobian / check_postgres_replication.py
Created December 16, 2010 20:13
Nagios plugin to check PostgreSQL 9 streaming replication lag.
#!/usr/bin/env python
"""
Nagios plugin to check PostgreSQL 9 streaming replication lag.
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install).
MIT licensed:
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved.
@patrys
patrys / abstract.py
Created September 17, 2010 11:59
Parametrized apps for Django
class AbstractMixin(object):
_classcache = {}
@classmethod
def contribute(cls):
return {}
@classmethod
def construct(cls, *args, **kwargs):
attrs = cls.contribute(*args, **kwargs)