Skip to content

Instantly share code, notes, and snippets.

dannvix /
Last active December 15, 2015 17:39
convert latitude & longitude to formatted address with Google Maps API
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys, traceback
import json, urllib2
def latlng_to_addr (lat, lng):
# convert given latitude & longitude to formatted address with Google Maps API
# ref:
maps_api_url = ',%s&sensor=false' % (lat, lng)
iwek / html5-blank-template
Created January 19, 2013 03:50
HTML5 Blank Template with jQuery
<!DOCTYPE html>
<meta charset="utf-8">
<title>Blank HTML5</title>
justinrosenthal /
Created October 11, 2012 06:33
Setup for statsd on Ubuntu ec2
sudo apt-get install git-core python-software-properties build-essential
sudo apt-get -y install python-software-properties debhelper
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get -y install nodejs npm
kevinswiber / hal.json
Created July 7, 2012 14:56
JSON Siren vs. HAL Representations
"_links": {
"self": { "href": "/orders" },
"next": { "href": "/orders?page=2" },
"find": { "href": "/orders{?id}", "templated": true }
"_embedded": {
"orders": [{
"_links": {
"self": { "href": "/orders/123" },
lsauer / gist:2907369
Last active January 17, 2022 09:59
Google Chrome special pages for memory, debug, resources, profiling, downloads...

###Overview of all chrome:// pages.

  • List by calling chrome://about/
  • Following is a direct dump from the 'about' page for reference

###List of Pages as per

CaptainN /
Created March 29, 2012 20:06
Just touch events for jQuery
// This is a combination of two modified files from jQuery Mobile,
// and
// They were modified to only provide the touch event shortcuts, and
// avoid the rest of the jQuery Mobile framework.
// The normal jQuery Mobile license applies.
// This plugin is an experiment for abstracting away the touch and mouse
// events so that developers don't have to worry about which method of input
// the device their document is loaded on supports.
bellbind / index.html
Created February 13, 2012 08:41
[facebook][javascript][nodejs]using facebook javascript sdk
<!doctype html>
<title>Facebook Canvas Page with JavaScript SDK</title>
<h1>Hello Facebook JS SDK</h1>
<!-- put fnb-root and initialize script for using Facebook JavaScript SDK -->
<div id="fb-root"></div>
addyosmani / visibly.js
Created August 3, 2011 12:44
Cross-browser Page Visibility API polyfill
* isVis - v0.5.5 Aug 2011 - Page Visibility API Polyfill
* Copyright (c) 2011 Addy Osmani
* Dual licensed under the MIT and GPL licenses.
(function () {
window.visibly = {
b: null,
q: document,
cfaulkingham / server.js
Created June 30, 2011 15:48
This example shows how to setup up a web server on port 8000 and fetch 10 results from a mysql database and outputing the results in html
// Hacked together from
// Colin Faulkingham
// This example shows how to setup up a web server on port 8000
// and fetch 10 results from a mysql database and outputting those results to HTML
// Version 2.0
// I cleaned up the code to be more readable.
the55 / noun_project.json
Created January 21, 2011 00:21
all the nouns in the noun project as of 17 jan 2011. from
{'bear': 'M11.068,34.558c-1.585-2.365-2.595-5.098-2.939-8.106c-0.344,0.092-0.666,0.161-1.033,0.161 c-2.342,0-4.248-1.906-4.248-4.248c0-1.47,0.758-2.756,1.883-3.514l12.147-8.45c2.549-1.562,5.534-2.526,8.749-2.641l30.149,0.092 L77.819,4.34c0-0.115,0-0.229,0-0.345C77.819,1.791,79.586,0,81.791,0c2.205,0,3.996,1.791,3.996,3.995 c0,0.345-0.046,0.712-0.138,1.034l2.043,0.275c2.365,0.459,4.156,2.549,4.156,5.052c0,0.161,0,0.298-0.022,0.436l6.544,3.536 c0.941,0.368,1.63,1.309,1.63,2.388c0,0.367-0.068,0.689-0.206,1.01l-1.631,3.697c-0.804,1.309-2.181,2.228-3.788,2.411 l-15.041,1.791L65.787,41.527l7.738,13.363l5.098,2.365c0.803,0.552,1.354,1.493,1.354,2.549c0,1.699-1.378,3.078-3.101,3.078 l-9.805,0.022c-2.525,0-4.707-1.424-5.809-3.49l-8.382-15.155l-18.92,0.023l6.682,10.287l4.937,2.25 c0.919,0.551,1.516,1.538,1.516,2.664c0,1.699-1.378,3.076-3.077,3.076l-9.828,0.023c-2.388,0-4.5-1.286-5.649-3.215l-9.208-14.627 l-6.429,6.246l-0.528,4.087l2.158,1.423c0.368,0.184,0.689,0.438,0.965,0.758c1.056,1.332,0.872,3.284-0.459,4.34 c-0.57