Skip to content

Instantly share code, notes, and snippets.

View PeterMitrano's full-sized avatar
🔬

Peter Mitrano PeterMitrano

🔬
View GitHub Profile
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@npryce
npryce / wip.py
Created May 28, 2011 20:17
Decorator to mark tests as work in progress for Python's Nose testing framework
from functools import wraps
from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
def fail(message):
raise AssertionError(message)
def wip(f):
@wraps(f)