Skip to content

Instantly share code, notes, and snippets.

View Raisins's full-sized avatar

Francis David Cleary Raisins

View GitHub Profile
@Raisins
Raisins / gist:8291149
Created January 6, 2014 22:40
The css classes that AdBlock blocks
.ad_bar,
.ad_below_content,
.ad_belowmenu,
.ad_bg,
.ad_bg_300x250,
.ad_big_banner,
.ad_bigbox,
.ad_billboard,
.ad_biz,
.ad_blk,
@Raisins
Raisins / fabfile.py
Created December 4, 2013 02:07
Simple Fabric file with some django
from fabric.api import local, run, cd, env, sudo, get, put, settings as fabric_settings
PROJECT_NAME = "myamazingproject"
# lets first set up some environments which we might want to go into
# allows us to use fab environment command
# we'll see later how this is used
def staging():
"""Sets up the staging environment for fab remote commands"""
env.PROJECT_PATH = "~/path/to/your/%s/" % (PROJECT_NAME)
@Raisins
Raisins / models.py
Created January 5, 2012 19:32
UserProfile Example
from django.contrib.auth.models import User
from django.db.models.signals import post_save
class UserProfile(models.Model):
user = models.OneToOneField(User)
#other fields here
def __str__(self):
return "%s's profile" % self.user