Skip to content

Instantly share code, notes, and snippets.

View amosson's full-sized avatar

Andrew Mosson amosson

View GitHub Profile
@staltz
staltz / introrx.md
Last active June 12, 2024 14:28
The introduction to Reactive Programming you've been missing
@johnbender
johnbender / prefs.js
Created February 23, 2013 06:20
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',
@Suor
Suor / mutating_querysets.py
Created March 16, 2011 07:27
Django: mutating querysets
# THIS VERSION IS OUTDATED
# see .inplace(), .cloning(), ._clone() and .clone() methods of QuerySetMixin
# in https://github.com/Suor/django-cacheops/blob/master/cacheops/query.py
from django.conf import settings
from django.db.models import Model, Manager
MUTATING_QUERYSETS = getattr(settings, 'MUTATING_QUERYSETS', False)
class QuerySetMixin(object):
def __init__(self, *args, **kwargs):