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 'underscore' | |
| child_process = require 'child_process' | |
| async = require 'async' | |
| healthCheckInterval = 60 * 1000 | |
| bounceInterval = 60 * 1000 | |
| bounceWait = bounceInterval + 30 * 1000 | |
| delayTimeout = (ms, func) -> setTimeout func, ms | |
| class MonitoredChild |
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
| // includes bindings for fetching/fetched | |
| var PaginatedCollection = Backbone.Collection.extend({ | |
| initialize: function() { | |
| _.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
| typeof(options) != 'undefined' || (options = {}); | |
| this.page = 1; | |
| typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
| }, | |
| fetch: function(options) { |
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
| /* ============================================================= | |
| * bootstrap-typeahead-backbone.js v2.0.0 | |
| * http://twitter.github.com/bootstrap/javascript.html#typeahead | |
| * https://github.com/twitter/bootstrap/blob/master/js/bootstrap-typeahead.js | |
| * Modified by Marius Andreiana to work with Backbone Collection, Model, View | |
| * - custom results formatting | |
| * - custom behavior on selected item (Model with complex information) | |
| * ============================================================= | |
| * Copyright 2012 Twitter, Inc. | |
| * |
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
| BlogPost = Backbone.Model.extend({ | |
| select: function(){ | |
| this.set({selected: true}); | |
| this.collection.selectPost(this); | |
| } | |
| }); | |
| BlogPosts = Backbone.Collection.extend({ | |
| model: BlogPost, |
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
| <ol class="wizard-nav"> | |
| <li class="done"><a href="#">Step 1</a></li> | |
| <li class="done"><a href="#">Step 2</a></li> | |
| <li class="active"><a href="#">Step 3</a></li> | |
| <li><a href="#" data-disabled>Step 4</a></li> | |
| <li><a href="#" data-disabled>Step 5</a></li> | |
| </ol> |
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
| var express = require('express'); | |
| var sys = require('sys'); | |
| var oauth = require('oauth'); | |
| var app = express.createServer(); | |
| var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
| var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
| function consumer() { |