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
| // ---- | |
| // libsass (v3.2.5) | |
| // ---- | |
| .message { | |
| border: 1px solid #ccc; | |
| padding: 10px; | |
| color: #333; | |
| } |
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 pm2 = require('pm2'); | |
| var metrics = require('next-metrics'); | |
| pm2.start({ | |
| name : "max_mem", | |
| script : "big-array.js", | |
| max_memory_restart : "20M" | |
| }, function(err, proc) { | |
| metrics.count('app.memory_restart', 1); | |
| }); |
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
| // Basic mechanic | |
| // Fetch Jobs from usergrid | |
| // For each job | |
| // push uuid to expiry queue with expiry time | |
| // push full job to fullJobs queue | |
| // When key expires | |
| // push expired key to workerq list | |
| // OnTick |
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
| function newObject(func) { | |
| // get an Array of all the arguments except the first one | |
| var args = Array.prototype.slice.call(arguments, 1); | |
| // create a new object with its prototype assigned to func.prototype | |
| var object = Object.create(func.prototype); | |
| // invoke the constructor, passing the new object as 'this' | |
| // and the rest of the arguments as the arguments | |
| func.apply(object, args); |
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
| //From http://weblog.bocoup.com/backbone-live-collections/ | |
| // Create a StreamCollection | |
| var StreamCollection = Backbone.Collection.extend({ | |
| stream: function(options) { | |
| // Cancel any potential previous stream | |
| this.unstream(); | |
| var _update = _.bind(function() { |