Skip to content

Instantly share code, notes, and snippets.


Rolo rolo

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rolo on github.
  • I am rolo ( on keybase.
  • I have a public key whose fingerprint is 816E E5E2 8715 EF59 72F6 3B88 5579 CCA6 B686 4958

To claim this, I am signing this object:

rolo / republish_all_pages
Created Aug 8, 2013
Automatically republish all Django CMS 2.4.2 pages which are already published. For when all pages needed republishing after an upgrade from 2.3.x.
View republish_all_pages
from cms.models.pagemodel import Page
pages = Page.objects.filter(published=True, publisher_is_draft=True)
for page in pages:
print '%s (%d)' % (page,
rolo /
Created Dec 7, 2012 — forked from mbrochh/
Django UserFactory with factory_boy - using random instead of clock to avoid username clashes
import random
from django.contrib.auth.models import User
from factory import Factory, LazyAttribute, Sequence
class UserFactory(Factory):
Creates a new ``User`` object.
Username will be a random 30 character md5 value.
rolo /
Created Aug 1, 2012
Python script to compile .shtml files with server side includes down to flat HTML suitable for hosting on S3 or where SSIs aren't supported.
#! /usr/bin/env python
import os
import re
import shutil
from os.path import splitext
SOURCE = os.getcwd() + "/www/"
TARGET = os.getcwd() + "/compiled/"
if not os.path.exists(TARGET):
rolo / gist:1481128
Created Dec 15, 2011
Install Postgres 9.1, PostGIS and create PostGIS template on Ubuntu 11.10 Oneiric Ocelot
View gist:1481128
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
You can’t perform that action at this time.