Skip to content

Instantly share code, notes, and snippets.

View mickeyckm's full-sized avatar

Mickey Cheong mickeyckm

View GitHub Profile
@mickeyckm
mickeyckm / gist:3713040
Created September 13, 2012 08:55
Step 1: Add new user
$ adduser mickeyckm
$ addgroup admin
$ adduser mickeyckm admin
@mickeyckm
mickeyckm / uri.js
Created May 7, 2012 15:47 — forked from jlong/uri.js
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"