Skip to content

Instantly share code, notes, and snippets.

View BernhardRode's full-sized avatar

Bernhard Rode BernhardRode

View GitHub Profile
@syzdek
syzdek / encrypt-sshpass.sh
Created July 9, 2012 20:25
Script to encrypt a string using an SSH user's public RSA ssh key.
#!/bin/sh
#
# Convience script for encrypting a SSH user's password
# using the user's public SSH RSA key.
#
# encrypt-sshpass.sh
#
PROGRAM_NAME=`basename ${0}`
@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"