Skip to content

Instantly share code, notes, and snippets.

View johnnybenson's full-sized avatar
👽
let's go

j-hnny johnnybenson

👽
let's go
View GitHub Profile
@johnnybenson
johnnybenson / ascii.php
Created September 5, 2016 18:38 — forked from donatj/ascii.php
Damn Simple PHP Ascii Art Generator
#!/usr/bin/php -q
<?php
if(isset($argv[1]) && strlen($argv[1])) {
$file = $argv[1];
}else{
echo 'Please Specify a File';
exit(1);
}
@johnnybenson
johnnybenson / uri.js
Created September 7, 2012 16:45 — 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"