Skip to content

Instantly share code, notes, and snippets.

View frecklebit's full-sized avatar

Adam Jenkins frecklebit

View GitHub Profile
@frecklebit
frecklebit / 0_reuse_code.js
Created January 21, 2014 16:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@frecklebit
frecklebit / uri.js
Created October 2, 2013 15:59 — forked from jlong/uri.js
JavaScript URI parser.
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"