Skip to content

Instantly share code, notes, and snippets.

@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"
@mbostock
mbostock / .block
Last active May 21, 2019 14:04
Hive Plot (Links)
license: gpl-3.0
@yyfrankyy
yyfrankyy / download_untar.sh
Created December 29, 2011 08:52
download from github's private repo
curl -sLk --user {username}:{password} https://github.com/{username}/{repo}/tarball/{tagname} | tar -xzf -