This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Notify of MacPort updates via Growl on Mac OS X | |
# | |
# Author: Chris Streeter http://www.chrisstreeter.com | |
# Requires: Growl Notify Extra to be installed (but fails gracefully). Info | |
# about how to get the extra is at http://growl.info/extras.php | |
TERM_APP='/Applications/Terminal.app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Day job: | |
Co-founder at Educreations | |
Favorite Python project: | |
Django | |
Favorite Conference: | |
Google I/O (so far) | |
Python Experience Level: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Notify of Homebrew updates via Growl on Mac OS X | |
# | |
# Author: Chris Streeter http://www.chrisstreeter.com | |
# Requires: Growl Notify Extra to be installed. Install with | |
# brew install growlnotify | |
TERM_APP='/Applications/Terminal.app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.sessions.backends.base import SessionBase, CreateError | |
from django.conf import settings | |
from django.utils.encoding import force_unicode | |
import redis | |
from redis.exceptions import ConnectionError | |
class SessionStore(SessionBase): | |
"""A redis-based session store.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
CHECKS = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.test.simple import DjangoTestSuiteRunner, reorder_suite | |
from django.utils.unittest import TestCase | |
from django.utils.unittest.loader import defaultTestLoader | |
class DiscoveryDjangoTestSuiteRunner(DjangoTestSuiteRunner): | |
def build_suite(self, test_labels, extra_tests=None, **kwargs): | |
if test_labels: | |
return super(DiscoveryDjangoTestSuiteRunner, self).build_suite(test_labels, extra_tests=extra_tests, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Notify of Homebrew updates via Notification Center on Mac OS X | |
# | |
# Author: Chris Streeter http://www.chrisstreeter.com | |
# Requires: terminal-notifier. Install with: | |
# gem install terminal-notifier | |
TERM_APP='/Applications/Terminal.app' | |
BREW_EXEC='/usr/local/bin/brew' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Queries the slow_log database table maintained by Amazon RDS and outputs | |
it in the normal MySQL slow log text format for parsing by mk-query- | |
digest. | |
""" | |
import argparse | |
import _mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[streeter@mail]:~$ source /usr/local/bin/virtualenvwrapper.sh | |
Traceback (most recent call last): | |
File "/usr/lib/python2.6/logging/handlers.py", line 72, in emit | |
self.doRollover() | |
File "/usr/lib/python2.6/logging/handlers.py", line 129, in doRollover | |
os.rename(self.baseFilename, dfn) | |
OSError: [Errno 13] Permission denied | |
Traceback (most recent call last): | |
File "/usr/lib/python2.6/logging/handlers.py", line 71, in emit | |
if self.shouldRollover(record): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reexec(self): | |
"""\ | |
Relaunch the master and workers. | |
""" | |
self.kill_workers(signal.SIGQUIT) | |
fds = [l.fileno() for l in self.LISTENERS] | |
os.environ['GUNICORN_FD'] = ",".join([str(fd) for fd in fds]) | |
os.chdir(self.START_CTX['cwd']) |
OlderNewer