Skip to content

Instantly share code, notes, and snippets.

View gpbmike's full-sized avatar
👋

Mike Horn gpbmike

👋
View GitHub Profile
YOUR_USERNAME = 'gpbmike'
import scout.recon.register
from django.contrib.auth.models import User
u = User.objects.get(username=YOUR_USERNAME)
u.profile['plan_id'] = 2
u.profile['next_billing_date'] = '2012-09-01'
u.save()
import datetime
import scout.recon.register
from django.contrib.auth.models import User
u = User.objects.get(username='')
u.profile['plan_id'] = 2
u.profile['next_billing_date'] = datetime.date(2012, 9, 1)
u.save()
@gpbmike
gpbmike / create_best_of_category.py
Created March 14, 2012 04:32 — forked from cooncesean/create_best_of_category.py
Create a 'Best Of' article Category for Tested.
from ella.core.models import *
article_cat = Category.objects.get(slug='news')
Category.objects.create(slug='best-of', title='Best Of', tree_path='news/best-of', tree_parent=article_cat, site_id=1)
skin: function (skinUrl, bgColor, contentWrapColor) {
var bgStyle = 'url(' + skinUrl + ') top center no-repeat ';
$('over_skin').setStyle("background", bgStyle + bgColor);
if (contentWrapColor) {
$('content-wrap').setStyle("background", contentWrapColor);
}
},
@gpbmike
gpbmike / gist:722738
Created December 1, 2010 00:53 — forked from snide/gist:722735
<a href="#js_table_1" class="toggle-table">table 1</a>
$('.toggle-table').click(function(e) {
e.preventDefault();
var table = $($(this).attr('href'));
if (table.is(':visible')) {
table.fadeOut('slow')
} else {
table.fadeIn('slow')
}