Skip to content

Instantly share code, notes, and snippets.

@tsaniel
tsaniel / LICENSE.txt
Created February 9, 2014 14:39 — forked from 140bytes/LICENSE.txt
Just another romanize
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created July 16, 2011 14:07 — forked from 140bytes/LICENSE.txt
UTF8 encoder
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created July 17, 2011 07:37 — forked from 140bytes/LICENSE.txt
JSON stringify
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created July 20, 2011 09:10 — forked from 140bytes/LICENSE.txt
toCamelCase
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / index.js
Created July 21, 2011 11:17
Unicode(UTF-16) to UTF-8
function(text) {
return text.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\u0000-\uD7FF\uE000-\uFFFF]/g, function($, offset) {
var isDoubleByte = $.length === 2
var unicode = isDoubleByte ?
(($.charCodeAt(offset) & 1023) << 10 | ($.charCodeAt(offset + 1) & 1023)) + 0x10000:
$.charCodeAt(offset);
return isDoubleByte ?
String.fromCharCode(
unicode >> 18 | 240,
unicode >> 12 & 63 | 128,
@tsaniel
tsaniel / LICENSE.txt
Created September 11, 2011 02:48 — forked from 140bytes/LICENSE.txt
The eight queens puzzle - get the number of soultions of an n queens puzzle
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created September 12, 2011 19:56 — forked from 140bytes/LICENSE.txt
The eight queens puzzle - get all the soultions
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created October 5, 2011 10:05 — forked from 140bytes/LICENSE.txt
isWindow
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created November 7, 2011 14:03 — forked from 140bytes/LICENSE.txt
Fisher–Yates shuffle
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tsaniel
tsaniel / LICENSE.txt
Created January 7, 2012 16:29 — forked from 140bytes/LICENSE.txt
PHPJS - ip2long
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE