This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** random 128-bit number as a string */ | |
function random128() { | |
var result = ""; | |
for (var i = 0; i < 8; i++) | |
result += String.fromCharCode(Math.random() * 0x10000); | |
return result; | |
} | |
/** random 128-bit number in canonical uuid format. all bits are random. */ | |
function random128Hex() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import json | |
def diff_objects(left, right): | |
if not (type(left) == type(right) == dict): | |
return right | |
result = {} | |
keys = set() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""\ | |
looks for non-utf8, windows-style encodings in filenames and fixes them. | |
""" | |
__version__ = "0.0" | |
import os, sys |
NewerOlder