Skip to content

Instantly share code, notes, and snippets.

View zspencer's full-sized avatar

Zee zspencer

View GitHub Profile
(defn inc-all []
(let [x '(1,2,3)]
(println (map inc x))
(println x)))
(inc-all)
(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)
@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;
class Player
def initialize
end
def play_turn(warrior)
@warrior = warrior
move_forward
data =
a: 0
b: "foo"
result = _(data).reject((v,k) -> k == 'b')
expect(result).toEqual(a: 0) #but fail! it returns: [0]
Account = (function(startingBalance) {
return {
balance: startingBalance,
getBalance: function() {
return this.balance
}
};
})
var accountOne = Account(0);
module Raptor
class App
def run options
require 'rack'
Rack::Handler::WEBrick.run(app, options)
end
end
end
@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);
};