Skip to content

Instantly share code, notes, and snippets.

View bnolan's full-sized avatar

Ben Nolan bnolan

View GitHub Profile
Initializable = function(sender){
var initialized = false;
sender.isInitialized = function(){
return initialized;
};
sender.setInitialized = function(){
initialized = true;
};
/*
* A wiggley text thingy for jquery
*/
var WiggleText = function(message){
var el = $("<div></div>").addClass("wiggletext").css({position: 'absolute'});
for(i=0;i<message.length;i++){
$("<span>" + message.charAt(i) + "</span>").css({position: 'relative'}).appendTo(el);
}
var Animal, Horse, Snake, sam, tom;
var __extends = function(child, parent) {
var ctor = function(){ };
ctor.prototype = parent.prototype;
child.__superClass__ = parent.prototype;
child.prototype = new ctor();
child.prototype.constructor = child;
};
Animal = function() { };
Animal.prototype.move = function(meters) {
var Item = function(world, id){
var self = this;
var position, scale, asset,
properties = {};
this.say = function(message){
$LOGGER.log("<b>Item</b>: " + message);
var Animal, Horse, Snake, sam, tom;
var __extends = function(child, parent) {
var ctor = function(){ };
ctor.prototype = parent.prototype;
child.__superClass__ = parent.prototype;
child.prototype = new ctor();
child.prototype.constructor = child;
};
Animal = function() {
};
var Animal, Horse, Snake, sam, tom;
var __extends = function(child, parent) {
var ctor = function(){ };
ctor.prototype = parent.prototype;
child.__superClass__ = parent.prototype;
child.prototype = new ctor();
child.prototype.constructor = child;
};
Animal = function() {
};
when World.Surface.CANVAS.FORE
g: context.createRadialGradient 0, 0, 0, 0, 0, 50
g.addColorStop 0.4, "rgba(150, 183, 51, 1)"
g.addColorStop 0.9, "rgba(150, 183, 51, 0)"
context.fillStyle: g2
context.beginPath()
context.arc 0, 0, 45, 0, Math.PI*2, true
context.closePath()
context.fill()
Instantiate: (klass) ->
ctor = window[klass]
if ctor instanceof Function
`new ctor`
else
throw "Could not construct class of type " + klass
redraw: =>
for x in y
$('body').click =>
@widgify(x)
Converts to this... The block inside the for loop isn't passed (this) as a context.
#!/bin/sh
#
# Pipes the rake coffee:watch growly output to growl
#
while read; do
echo $REPLY
# echo $REPLY | growlnotify -a growlify -t $1;