Skip to content

Instantly share code, notes, and snippets.

View SebastianEdwards's full-sized avatar

Sebastian Edwards SebastianEdwards

View GitHub Profile
require 'fiddle'
require 'fiddle/import'
module GVL
include Fiddle
extend Importer
dlload Handle::DEFAULT
T = import_function 'rb_thread_call_without_gvl', TYPE_VOIDP,
@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"