Skip to content

Instantly share code, notes, and snippets.

@mojombo
mojombo / vwilight.vim
Created January 26, 2011 03:23
vwilight.vim: A TRUE Twilight color theme for Vim
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@cowboy
cowboy / HEY-YOU.md
Last active February 27, 2025 12:24
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
# pip install growl-py
try:
import Growl
i = Growl.Image.imageFromPath('media/img/amo2009/logo-mozilla.gif')
g = Growl.GrowlNotifier(applicationName='z', applicationIcon=i,
notifications=['Info'])
g.register()
g.notify('Info', 'ZAMBONI', None)
except Exception, e:
@jbalogh
jbalogh / urlconf_decorator.py
Created September 23, 2010 17:32
Apply a decorator to a whole urlconf instead of a single view function.
"""
Apply a decorator to a whole urlconf instead of a single view function.
Usage::
>>> from urlconf_decorator import decorate
>>>
>>> def dec(f):
... def wrapper(*args, **kw):
... print 'inside the decorator'
@jbalogh
jbalogh / async_signals.py
Created September 23, 2010 04:24
A monkeypatch for ``django.dispatch`` to send signals asynchronously.
"""
A monkeypatch for ``django.dispatch`` to send signals asynchronously.
Usage::
>>> import async_signals
>>> async_signals.start_the_machine()
``django.dispatch.Signal.send`` is replaced with an asynchronous version that
adds the signal to a queue processed on a background thread. The synchronous
@jsocol
jsocol / gist:430368
Created June 8, 2010 17:36
git-fall - Fetch and prune all remotes
#!/bin/bash
# Fetch and prune all remotes.
for r in `git remote`
do
git remote prune $r
git fetch $r
done