Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Sloan timsloan

View GitHub Profile
View foundation_paginator.py
# -*- 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
"""
View check_for_updates.py
#!/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
View multisettings.py
"""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()
@timsloan
timsloan / SCVNGR.md
Created Jul 28, 2011 — forked from fredoliveira/SCVNGR.md
Game mechanics deck from SCVNGR. More info: http://tcrn.ch/hD830P
View SCVNGR.md

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.

You can’t perform that action at this time.