Skip to content

Instantly share code, notes, and snippets.

View timsloan's full-sized avatar

Tim Sloan timsloan

View GitHub Profile
@timsloan
timsloan / SCVNGR.md
Created July 28, 2011 07:52 — forked from fredoliveira/SCVNGR.md
Game mechanics deck from SCVNGR. More info: http://tcrn.ch/hD830P

1. Achievement

Definition: A virtual or physical representation of having accomplished something. These are often viewed as rewards in and of themselves.

Example: a badge, a level, a reward, points, really anything defined as a reward can be a reward.

2. Appointment Dynamic

Definition: A dynamic in which to succeed, one must return at a predefined time to take some action. Appointment dynamics are often deeply related to interval based reward schedules or avoidance dyanmics.

"""Multisite - individual site for request"""
from django.conf import settings
from threading import local
def make_tls_property(default=None):
"""Creates a class-wide instance property with a thread-specific value."""
class TLSProperty(object):
def __init__(self):
self.local = local()
#!/usr/bin/env python
"""
Use pip to get a list of local packages to check against one or more package
indexes for updated versions.
"""
import pip
import sys
import xmlrpclib
from cStringIO import StringIO
from distutils.version import StrictVersion, LooseVersion
# -*- coding: utf-8 -*-
"""
Based on http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/
and http://djangosnippets.org/snippets/2680/
Recreated by Haisheng HU <hanson2010@gmail.com> on Jun 3, 2012
Updated by Simon Bächler for Foundation on May 23, 2013
http://foundation.zurb.com/docs/components/pagination.html
"""