Skip to content

Instantly share code, notes, and snippets.

@paulosman
paulosman / gist:974470
Created May 16, 2011 13:48
Threaded runserver for Django
#!/usr/bin/env python
#
# Mostly taken from:
# http://nedbatchelder.com/blog/201103/quick_and_dirty_multithreaded_django_dev_server.html
import os
import site
from django.core.management import execute_manager
@paulosman
paulosman / .emacs
Created April 19, 2011 18:50
Shell script that runs pyflakes and pep8
(when (load "flymake" t)
(defun flymake-pyflakes-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "pychecker.sh" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pyflakes-init)))
@paulosman
paulosman / badgelab.json
Created November 25, 2010 22:00
Strawman JSON schema for federated badge system
{
"schema": "https://example.com/badge/1",
"mustSupport": [],
"title": "School of Webcraft Responder",
"description": "This badge is in recognition of the helpful responses you have provided to fellow members of the School of Webcraft.",
"timestamp": "1288882617",
"expires": "8462729988",
"badgeURL": "https://badger.mozilla.com/badges/asdf1234",
"issuer": "https://badger.mozilla.com/",
"issuerName": "P2PU School of Webcraft",