This file contains hidden or 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
| insert: (ball, column) -> | |
| for row in @rows when row[column] is null | |
| row[column] = ball | |
| return |
This file contains hidden or 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
| highlightWord = (node, word) -> | |
| if node.hasChildNodes | |
| children = node.childNodes | |
| highlightWord(item, word) for item in children | |
| if node.nodeType == 3 | |
| tempNodeVal = node.nodeValue.toLowerCase() | |
| tempWordValue = word.toLowerCase() | |
This file contains hidden or 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
| fs = require "fs" | |
| path = require "path" | |
| rimraf = require "rimraf" | |
| {spawn} = require "child_process" | |
| url = require "url" | |
| heroku = | |
| config: (callback) -> | |
| child = spawn "heroku", ["config", "--shell"] | |
| raw = "" |
This file contains hidden or 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
| # In general, there are many places in the file where you can leave off the parens in function calls, if you like. | |
| unless typeof exports is "undefined" # `unless ... else` reads poorly in English. Better to stick to `if ... else`. | |
| Spine = exports | |
| else | |
| Spine = @Spine = {} | |
| Spine.version = "0.0.4" | |
| $ = Spine.$ = @jQuery || @Zepto || -> arguments[0] # In Coffee, `or` is preferred over `||`. |
This file contains hidden or 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
| Todos = SC.Application.create() | |
| Todos.Todo = SC.Object.extend | |
| title: null | |
| isDone: false | |
| Todos.todosController = SC.ArrayProxy.create | |
| content: [] | |
| createTodo: (title) -> |
This file contains hidden or 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
| York = {} | |
| if exports? | |
| _ = require 'underscore' | |
| $ = require 'jquery' | |
| Backbone = require 'backbone' | |
| DNode = require 'dnode' | |
| York = exports | |
| server = true | |
| else |
This file contains hidden or 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
| json_data = JSON.stringify | |
| "STATUS_ID is": status | |
| "COMMAND is": command_str.trim() | |
| "RESULT is": result_str | |
| , null, '\n' | |
This file contains hidden or 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
| subdata = { } | |
| for field in @updateable | |
| subdata[ field ] = @data[ field ] |
This file contains hidden or 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.paths.unshift __dirname | |
| express = require 'express' | |
| app = express.createServer() | |
| app.configure -> | |
| app.set 'views', '#{__dirname}/views' | |
| app.use express.logger() | |
| app.use express.bodyDecoder() |
This file contains hidden or 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 |
NewerOlder