EMPMYMIP seems to mostly kind of work for me. It might even do the same for you!
The implementation is kind of a huge hack, though, and it might very well
#!/bin/sh | |
setup_brew () { | |
if ![-f "/usr/local/bin/brew"]; then | |
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
fi | |
} | |
setup_ipython () { | |
brew install readline |
from django.db.models.signals import post_init | |
def track_data(*fields): | |
""" | |
Tracks property changes on a model instance. | |
The changed list of properties is refreshed on model initialization | |
and save. | |
>>> @track_data('name') |
# FOR CENTOS 6 | |
# Andrew Diller Jan 2012 | |
# Get EPEL Repo installed | |
rpm --httpproxy proxy --httpport 3128 --import https://fedoraproject.org/static/0608B895.txt | |
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm | |
vi /etc/yum.repos.d/epel.repo |
CELERY=`ps -A -o pid,rss,command | grep celeryd | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
GUNICORN=`ps -A -o pid,rss,command | grep gunicorn | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
REDIS=`ps -A -o pid,rss,command | grep redis | grep -v grep | awk '{total+=$2}END{printf("%d", total)}'` | |
NGINX=`ps -A -o pid,rss,command | grep nginx | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
OTHER=`ps -A -o pid,rss,command | grep -v nginx | grep -v celeryd | grep -v gunicorn | grep -v redis | grep -v grep | awk '{total+=$2}END{printf("%d", total/1024)}'` | |
websites=`ps -A -o user,pid,rss,command | grep gunicorn | egrep -o "[a-z_]+\.py$" | sort | uniq | perl -wpe 's|\.py$||;' | xargs` | |
printf "%-10s %3s MB\n" "Celery:" $CELERY | |
printf "%-10s %3s MB\n" "Gunicorn:" $GUNICORN | |
printf "%-10s %3s MB\n" "Nginx:" $NGINX | |
printf "%-10s %3s KB\n" "Redis:" $REDIS |
from django.conf import settings | |
from django.core.management.base import CommandError | |
from optparse import make_option | |
import re | |
import sys | |
try: | |
from south.management.commands.test import Command as BaseCommand | |
except ImportError: |
#!/usr/bin/env python | |
""" | |
Run Django Tests with full test coverage | |
This starts coverage early enough to get all of the model loading & | |
other startup code. It also allows you to change the output location | |
from $PROJECT_ROOT/coverage by setting the $TEST_COVERAGE_OUTPUT_DIR | |
environmental variable. | |
""" |
$(document).bind('ajaxError', function(e, jqXHR){ | |
if (jqXHR.status == 500){ | |
var erframe = document.createElement('iframe'); | |
$('body').append(erframe); | |
$(erframe).css({ | |
'position': 'absolute', | |
'top': '5%', 'left': '50%', | |
'width': '90%', 'height': '90%', | |
'marginLeft': '-45%', | |
'z-index' : '9999999' |
from django.conf import settings | |
from django.core.management.base import CommandError | |
from optparse import make_option | |
import re | |
import sys | |
try: | |
from south.management.commands.test import Command as BaseCommand | |
except ImportError: |
#!/usr/bin/env python | |
""" | |
Use pip to get a list of local packages to check against one or more package | |
indexes for updated versions. | |
""" | |
import pip | |
import sys, xmlrpclib | |
from cStringIO import StringIO | |
from distutils.version import StrictVersion, LooseVersion |