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
require('coffee-script/register'); | |
require('./gulpfile.coffee'); |
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
if has('vim_starting') | |
set nocompatible " Be iMproved | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
endif | |
call neobundle#rc(expand('~/.vim/bundle/')) | |
" Let NeoBundle manage NeoBundle | |
NeoBundleFetch 'Shougo/neobundle.vim' |
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
# lib/Widget.coffee | |
class Widget | |
@forElement: (el) -> | |
type = el.dataSet.type | |
new require("lib/widgets/#{type}")(el) | |
constructor: (@el) -> | |
# generic superclass stuff | |
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 ajaxSpy = (function($){ | |
var oldAjax = $.ajax; | |
var requests = []; | |
var watchers = []; | |
function newAjax(opts){ | |
// execute real $.ajax and save the promise | |
var promise = oldAjax.apply(this, arguments); | |
requests.push({ | |
opts: opts, |
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
1075446353799203608005222047954026648916985018736581275753957497919839201623062887108721238807090848775021233760505186276438761497628718313149293175492755964685299434067108769528175430469423430061224064134888298650648205437920120403949631508956152559756188631959778290070643186622664875761846921766320383330860641231669497209040038077155027094109100466684104868860172692233512833407904643636044479840607123525858089016669511195551342610686077687896153683341897904992123861154943231617441207762969246167447753839618170201505400277058903800509767455975921283551524825711820638926971423748415355075057220848003095975436512897675614177005302585376395860084950971646483190331493537275840263066908452501651327026817692918216857663786238273533278053604714843805103802595548879565827410480101450006914802010323621032427750751014021958919466809270231408989645550289257201025616453072054558525073602481994601974714740025917272965189244586918777770442352148397581651051391096829792054910040180994636018505347027812313732698892543429416 |
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
curry = (fn, args...) -> | |
old_args = args.slice() | |
currier = (x...) -> | |
if arguments.length is 0 | |
val = fn(args...) | |
args = old_args | |
val | |
else | |
args = [args..., x...] | |
currier |
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
class Card extends Spine.Model | |
@configure 'Card', 'id', "name", "parent_id", "lft", "rgt", | |
"high_person_week", "created_at", "updated_at", "project_id", | |
"low_person_week", "type", "data" | |
@extend Spine.Model.Ajax | |
@url: '/cards' | |
url: -> "/projects/#{@project_id}/cards/#{@id}" |
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
Header append Access-Control-Allow-Origin: * | |
Header append Access-Control-Allow-Credentials: true | |
Header append Access-Control-Allow-Methods: OPTIONS, GET, POST, PUT, DELETE | |
Header append Access-Control-Allow-Headers: Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control |
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
def fizzbuzz(n) | |
[ | |
'FizzBuzz', | |
1, | |
2, | |
'Fizz', | |
4, | |
'Buzz', | |
'Fizz', | |
7, |
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
fib1 = (index) -> | |
if index < 2 | |
1 | |
else | |
fib1(index - 1) + fib1(index - 2) | |
fib2 = (index) -> | |
hash = {} | |
fib2 = (index) -> | |
hash[index] or= if index < 2 |