Skip to content

Instantly share code, notes, and snippets.

View gregplaysguitar's full-sized avatar

Greg Brown gregplaysguitar

View GitHub Profile
@gregplaysguitar
gregplaysguitar / .gitignore
Created May 8, 2011 22:00
Some simple Ubuntu server monitoring tools
*.pyc
conf.py
@gregplaysguitar
gregplaysguitar / readme.markdown
Created November 10, 2010 21:50
The following is a simple django custom management command to handle model field additions and deletions on a development machine. It automates a common pattern in django development – that of renaming an existing table, recreating via syncdb, and inserti

Simple django management command to automate the process of renaming an existing table, recreating via syncdb, and inserting the old data into the new table. Currently does not handle field renames - will eat your data if you try.

To install, save this file into an installed django app's management/commands/ directory, eg

myapp/management/commands/simplemigration.py

Run the command from the command line as follows

python manage.py simplemigration APPNAME.MODELNAME

$(document).unload(function(){
google.maps.Unload();
});
$(document).ready(function(){
$("input.location_picker").each(function (i) {
var me = $(this),
mapDiv = $('<div>').insertBefore(me).addClass('location_picker_map');
me.css('display','none');
div.customselect {
position: relative;
display: block;
width: 240px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
z-index: 100;
background: #F2FFDC;
color: #333;

Typekit Font Events

Web fonts may be the best thing to happen to web design in years, but that doesn't mean there aren't some tricky issues to overcome. One of the most annoying things is dealing with what's become known as the FOUT or 'Flash of Unstyled Text'. It's what happens in some browsers while waiting for fonts to download.

Typekit is introducing Font Events to put you back in control when using web