Skip to content

Instantly share code, notes, and snippets.

@martinth
martinth / assertion_hook.py
Created August 8, 2011 21:24
A sample exception hook, that prints useful information if an AssertionError occures
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os.path
import pprint
sys._old_excepthook = sys.excepthook
def assert_hook(exc_type, exception, traceback):
@Benjol
Benjol / selfupdatingscript.user.js
Created March 17, 2011 09:33
SelfUpdatingUserScript
// ==UserScript==
// @name SelfUpdatingScript
// @version 1.0.0
// @namespace Benjol (http://stackoverflow.com/users/11410/benjol)
// @description Template script for a self-updating script
// @credits Kudos to http://stackoverflow.com/users/115866/balpha
// @include https://gist.github.com/*
// ==/UserScript==
function with_jquery(f) {