Fork of http://bytbox.net/hacks/sloc/