- http://pypi.python.org/pypi/jsongrep
- list of tools at https://github.com/trentm/json#readme
- json:select: http://jsonselect.org/
- jsonpipe: https://github.com/dvxhouse/jsonpipe
- json-command: https://github.com/zpoley/json-command
- JSONPath: http://goessner.net/articles/JsonPath/, http://code.google.com/p/jsonpath/wiki/Javascript
- http://stedolan.github.io/jq/
- jsawk: https://github.com/micha/jsawk
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
update.every = function(sec, doThis) { | |
update.during( | |
new EventChain() | |
.wait(sec) | |
.then(doThis) | |
.repeat() | |
); | |
return this; | |
}; |
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
// Returned from this constructor thing. | |
return update; | |
}; | |
}); |
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
update.repeat = function(times) { | |
times = times || Infinity; | |
var originalTimes = times; | |
var stepsCopy; | |
steps.push(function() { | |
times -= 1; | |
if (times > 0) { | |
var args = stepsCopy.slice(0); | |
args.unshift(1, 0); | |
[].splice.apply(steps, args); |
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
# | |
# Shamelessly copied from http://blog.yesmeck.com/archives/make-git-automatically-remove-trailing-whitespace-before-committing/ | |
# | |
# What's distinct about this version, as opposed to several I've seen, | |
# is that it only fixes the whitespace on lines you've actually changed, | |
# so avoids making you the blamee of code you didn't change. | |
# Find files with trailing whitespace | |
for file in `git diff --check --cached | grep '^[^+-]' | grep -o '^.*[0-9]\+:'` ; do | |
file_name=`echo ${file} | grep -o '^[^:]\+'` |
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 NUM_SPRITE_COLS = 6; | |
var gm = require('gm'); | |
grunt.registerMultiTask('sprite', 'Sprite images', function() { | |
var images = this.data; | |
var numRows = Math.ceil(images.length / NUM_SPRITE_COLS); | |
var sprite = gm(''); | |
sprite.tile(NUM_SPRITE_COLS + 'x' + numRows); | |
sprite.quality('100'); | |
sprite.background('transparent'); |
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
sprite: { | |
'media/player.png': [ | |
'build/player-idle001.png', | |
'build/player-kneel001.png', | |
'build/player-kneel002.png', | |
'build/player-kneel003.png', | |
'build/player-kneel004.png', | |
'build/player-kneel005.png', | |
'build/player-walk001.png', | |
'build/player-walk002.png', |
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
preload: function() { | |
game.stage.scale.minWidth = 320; | |
game.stage.scale.minHeight = 240; | |
game.stage.scale.maxWidth = 640; | |
game.stage.scale.maxHeight = 480; | |
game.stage.scale.pageAlignHorizontally = true; | |
game.stage.scale.scaleMode = Phaser.StageScaleMode.SHOW_ALL; | |
game.stage.scale.setShowAll(); |
I hereby claim:
- I am drhayes on github.
- I am drhayes (https://keybase.io/drhayes) on keybase.
- I have a public key whose fingerprint is 17C5 BB89 6584 45B1 B431 D800 78E4 6D79 D295 413E
To claim this, I am signing this 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
Verifying myself: My Bitcoin username is +drhayes. https://onename.io/drhayes |