Skip to content

Instantly share code, notes, and snippets.

View zspencer's full-sized avatar

Zee zspencer

View GitHub Profile
@zspencer
zspencer / mapform.js
Created September 14, 2011 12:16 — forked from mdoel/mapform.js
How to unit test this
$.fn.inFieldLabels = function() {}
$.fn.map_control = function() {}
$(document).ready(function() {
new MapForm();
});
(function() {
window.MapForm = function() {
$(document).ready(this.initialize);
};
module Raptor
class App
def run options
require 'rack'
Rack::Handler::WEBrick.run(app, options)
end
end
end
Account = (function(startingBalance) {
return {
balance: startingBalance,
getBalance: function() {
return this.balance
}
};
})
var accountOne = Account(0);
data =
a: 0
b: "foo"
result = _(data).reject((v,k) -> k == 'b')
expect(result).toEqual(a: 0) #but fail! it returns: [0]
class Player
def initialize
end
def play_turn(warrior)
@warrior = warrior
move_forward
@zspencer
zspencer / gist:3784043
Created September 25, 2012 19:51 — forked from nhajratw/gist:3783890
accessing functions??
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
var id;
var inProgressDate;
var acceptedDate;
var cycleTime;
(verse 1)
The boss thinks you are get-ting la-zy and fat,
Want's you to get up and get off your ass.
What's a better motivator than a stat?
Even better if it just happens like that.
Take off your shoes and walk on the grass
I'm on your belt and I don't take any sass
(chorus)
(defn inc-all []
(let [x '(1,2,3)]
(println (map inc x))
(println x)))
(inc-all)