Skip to content

Instantly share code, notes, and snippets.

@Vp3n
Vp3n / min.py
Created August 30, 2012 15:59 — forked from eoinmcg/min.py
Handy utility for @js13kGames, zip your files and keep track of file size
#!/usr/bin/python
# Simple python script that takes a html file extracts all scripts and concatenates them into
# a single file. The concatenated script is then sent to the google closure compiler for further
# squishing.
# Finally a game.zip archive is created with all specified files. The size of this archive
# is printed to standard output
#
# Usage:
# In the terminal type:
@Vp3n
Vp3n / uri.js
Created July 14, 2012 16:34 — 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"