Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@mhulse
mhulse / helpers.py
Created June 15, 2011 19:34
Django (1.3) Google Maps v3 Geocoder service lookup example
import urllib, urllib2, simplejson
from django.utils.encoding import smart_str
def get_lat_lng(location):
# http://djangosnippets.org/snippets/293/
# http://code.google.com/p/gmaps-samples/source/browse/trunk/geocoder/python/SimpleParser.py?r=2476
# http://stackoverflow.com/questions/2846321/best-and-simple-way-to-handle-json-in-django
# http://djangosnippets.org/snippets/2399/
@scrooloose
scrooloose / gist-line-number-hack.js
Created June 27, 2010 08:59
A hack to add line numbers to gists, requires jquery
function addLineNumbersToAllGists() {
$('.gist').each( function() {
_addLineNumbersToGist('#' + $(this).attr('id'));
});
}
function addLineNumbersToGist(id) {
_addLineNumbersToGist('#gist-' + id);
}