Skip to content

Instantly share code, notes, and snippets.

View mathieutu's full-sized avatar
🚴

Mathieu TUDISCO mathieutu

🚴
View GitHub Profile
@mathieutu
mathieutu / uri.js
Created April 19, 2018 06:37 — 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"
@mathieutu
mathieutu / gitForcePull
Last active November 21, 2017 15:08 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master