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
// just toying around with some ideas | |
ul = { | |
backgroundImage : url('hurr'), | |
font : { | |
weight : 'bold', | |
}, | |
li : { |
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
// Quick JSDOC-like notation for describing objects in a Scribblenauts-type world (only better, that game is not great) | |
@param {String} name (eg. 'Zombie') | |
@param {Boolean} alive | |
@param {String} type ( | |
'animal', 'humanoid', 'insect', 'bludgeon weapon', 'projectile weapon', '...?' | |
) | |
@param {Object} alive { | |
@param {Number} aggression |
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
# Node Package Manager | |
npm [npm-options] command [command options] | |
install <package> | |
[-b (stable, edge, nightly) | --branch] | |
[-f | --force] | |
[-v | --version] | |
remove <package> | |
[-f | --force] |
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
// Transcribe of the code from http://www.slideshare.net/Dmitry.Baranovskiy/canvas-2195590 | |
var ctx = el.getContext('2d'); | |
ctx.save(); | |
ctx.restore(); | |
ctx.scale(w, h); | |
ctx.rotate(angle); | |
ctx.translate(x, y); | |
ctx.transform(m11, m12, m21, m22, dx, dy); | |
ctx.setTransform(m11, m12, m21, m22, dx, dy); |
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
(function() { | |
var SCREEN_WIDTH = 480, | |
SCREEN_HEIGHT = 360, | |
SPRITE_SIZE = 24, | |
TILE_SIZE = 24, | |
TILES_WIDTH = 20, | |
TILES_HEIGHT = 15; | |
var game, |
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
/** | |
* DGE audio Object. This is how I want the API to look | |
*/ | |
/* | |
DGE.audio = { | |
mute : function() { | |
}, | |
volume : function() { | |
}, |
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
Function.prototype._ = function() { | |
var that = this, args = arguments; | |
return function() { | |
that.apply(that, args); | |
}; | |
}; |
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
// A Text object in this example can just be something simple like <div>text here</div> | |
var text = new Text(); | |
// --- API type A --- | |
// Sets the color to "red" | |
text.color('red'); | |
// No parameter passed means it returns the color (in this case, "red") | |
var color = text.color(); |
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
var obj = new SpecialObject(); | |
// Type A - single value passed in. | |
obj.on('set:image', function(image) { | |
// This part is unimportant, just an example | |
setCSS('background-image', image); | |
// Stops the event | |
return false; |
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 cgi | |
import simplejson as json | |
import os | |
from google.appengine.ext import db | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import template | |
from google.appengine.ext.webapp import util |
OlderNewer