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
options = | |
callback: => @interviewEditor.setup() | |
menuId: '#setup_interview' | |
$('#main_menu li#setup_interview a').bind 'click', options, @menuClickCallback |
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
console.log [ | |
foo: 1 | |
, | |
bar: 2 | |
] |
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
for f, index in files | |
extname = path.extname f | |
fs.lstat f, (err, stats) -> | |
if !stats.isDirectory() and extname is '.coffee' | |
fs.readFile f, 'utf8', compileCallback | |
else if stats.isDirectory() | |
readDirAfterThisOne = -> | |
if index is files.length - 1 then clearInterval(h) and processDir(f) | |
h = setInterval readDirAfterThisOne, 50 |
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 a | |
### | |
b | |
### | |
else | |
c |
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
this.set({status: status}); | |
this.trigger("change:status", this, status); |
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 Utilities | |
@findPos: (obj) -> | |
obj = obj.get(0) if obj.html? | |
left = top = 0 | |
measure = -> | |
left += obj.offsetLeft | |
top += obj.offsetTop | |
measure() | |
measure() while obj = obj.offsetParent |
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
getstyles -> | |
result = {} | |
for key in arguments | |
result[key] = this.getStyle(key) | |
return result |
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
assert.deepEqual item, { | |
x: 1 | |
y: 2 | |
} | |
# Or: | |
assert.deepEqual item, |
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 ViewModel | |
firstName: ko.observable 'Bob' | |
lastName: ko.observable 'Smith' | |
constructor: | |
names = -> @firstName() + ' ' + @lastName() | |
@fullName = ko.dependentObservable names, this |