This file contains 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
var logEvents = function(el) { | |
Object.getOwnPropertyNames(el).join(" ").match(/\bon\S+/g).forEach(function(n){el[n]=function(e){console.log(e.type,e)}}); | |
} |
This file contains 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
var ChangeList = {}; | |
if (typeof module !== 'undefined') { | |
module.exports = ChangeList; | |
} | |
// Creates a new change list struct. | |
// | |
ChangeList.create = function(type) { | |
var type = type || ChangeList.Object; |
This file contains 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/ruby | |
# USAGE: my_bucket_put FILE_1 [FILE_N...] | |
# Uploads $local_path_for_bucket/FILE_1 to my_bucket/FILE_1 | |
# This script has very little configuration to keep it simple (and serve my limited needs). | |
# Create a pre-configured copy of this for all your buckets. Or add command line flags. | |
# | |
# Change this to your bucket name | |
bucketname = "my_bucket" |
This file contains 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
var embed = [ | |
'tag', 'uint32be', | |
'code', 'uint32le', | |
'greet', 'cstring' | |
]; | |
var def = [ | |
'tag', 'cstring:4', | |
'code', 'uint32le', | |
'embed', embed, | |
'length', 'uint16be', |
This file contains 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
4988782 movl | |
918146 calll | |
668426 leal | |
513400 popl | |
445392 pushl | |
438901 addl | |
435478 je | |
405022 cmpl | |
349294 testl | |
312041 jmp |
This file contains 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
ABStruct = {}; | |
ABStruct.create = function(def) { | |
var f = function(dataView) { | |
this.dataView = dataView; | |
}; | |
f.prototype = {}; | |
var idx = [0]; | |
for (var i in def) { | |
Object.defineProperty(f.prototype, i, ABStruct.getter(def[i], idx)); | |
} |
This file contains 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
http://fhtr.org/structdef.js/shp.html | |
http://github.com/kig/structdef.js/ | |
var xyDef = {x: 'float64le', y: 'float64le'}; | |
var polyDef = { | |
minX: 'float64le', | |
minY: 'float64le', | |
maxX: 'float64le', | |
maxY: 'float64le', | |
partCount: 'int32le', |
This file contains 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
/** | |
Struct definition object: | |
var myStruct = { | |
'width': 'uint32', | |
'height': 'uint32', | |
'channels': 'uint8', | |
'bias': 'float32', | |
'name': 'cstring', | |
'thumbnail': { |
This file contains 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
ArrayBuffer.littleEndian = new Int8Array(new Int16Array([1]).buffer)[0] > 0; | |
var arrayToNative = function(array, arrayIsLittleEndian) { | |
if (!!arrayIsLittleEndian == ArrayBuffer.littleEndian) { | |
return array; | |
} else { | |
return flipArrayEndianness(array); | |
} | |
}; |
This file contains 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
application: website-12345 | |
version: 1 | |
runtime: python | |
api_version: 1 | |
#default_expiration: "30d" | |
handlers: | |
- url: / |