Skip to content

Instantly share code, notes, and snippets.

View CodyReichert's full-sized avatar
🤠
cowboy coding

Cody Reichert CodyReichert

🤠
cowboy coding
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"
(require 'moz)
;;; Usage
;; Run M-x moz-reload-on-save-mode to switch moz-reload on/off in the
;; current buffer.
;; When active, saving the buffer triggers Firefox
;; to reload its current page.
(define-minor-mode moz-reload-on-save-mode
"Moz Reload On Save Minor Mode"