Skip to content

Instantly share code, notes, and snippets.

View dmckean's full-sized avatar

Dave McKean dmckean

View GitHub Profile
@zackn9ne
zackn9ne / save_to_instapaper.sh
Created May 6, 2016 05:30
zackn9ne's save to instapaper shellscript
#!/bin/bash
source ~/.crudentials; #for USERNAME="" && PASS=""
URL="$1"
curl -u ${USERNAME}:${PASS} -X POST --data url="${URL}" https://www.instapaper.com/api/add
@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"