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 async = require('async'); | |
module.exports = function(config) { | |
var group = { | |
name: 'Search Indexer', | |
tasks: [] | |
}; | |
group.tasks.push(task = { | |
group: group.name, |
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
describe('post /impressions/add', function() { | |
it('succeeds', function() { | |
var inputs = { | |
link: 'link' + Math.floor(Math.random() * 1000), | |
user: 'user' + Math.floor(Math.random() * 1000), | |
seconds: Math.floor(Math.random() * 1000) | |
}; | |
var impressionsStub = sinon.stub(impressions, 'add', function(db, user, link, facts, callback) { | |
debug('stub add called'); |
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
describe('addHandler', function() { | |
it('parses request and calls api', function() { | |
var values = { | |
link: 'link' + Math.floor(Math.random() * 1000), | |
user: 'user' + Math.floor(Math.random() * 1000), | |
seconds: Math.floor(Math.random() * 1000) | |
}; | |
// setup | |
var impressionsMock = sinon.mock(impressions); |
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
[root@vidlink ~/apps/striim]# npm install -g forever | |
npm http GET https://registry.npmjs.org/forever | |
npm http 304 https://registry.npmjs.org/forever | |
npm http GET https://registry.npmjs.org/broadway | |
npm http GET https://registry.npmjs.org/cliff | |
npm http GET https://github.com/AvianFlu/daemon.node/tarball/master | |
npm http GET https://registry.npmjs.org/flatiron | |
npm http GET https://registry.npmjs.org/microtime | |
npm http GET https://registry.npmjs.org/nconf | |
npm http GET https://registry.npmjs.org/nssocket |
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
info it worked if it ends with ok | |
verbose cli [ 'node', '/usr/bin/npm', 'install', '-g', 'daemon' ] | |
info using npm@1.1.4 | |
info using node@v0.6.17 | |
verbose /usr/local/bin/node node symlink | |
verbose config file /root/.npmrc | |
verbose config file /usr/local/etc/npmrc | |
verbose config file /usr/share/npm/npmrc | |
silly exec /usr/local/bin/node "/usr/share/npm/bin/npm-get-uid-gid.js" "nobody" 0 | |
silly spawning [ '/usr/local/bin/node', |
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
[{"_id":"tt1971833","airDate":"2012-04-01","cover":"3654e7addede6569804031a9742c8252","episode":1,"genres":["Adventure","Drama","Fantasy"],"linkCount":38,"name":"The North Remembers","rating":8.6,"season":2,"seo":"game-of-thrones/s2/e1/the-north-remembers","show":"tt0944947","show_name":"Game of Thrones","synopsis":"Winter is coming as the Night Watch go to meet the threat north of the Wall, the standoff between the...","votes":1870,"links":[{"_id":"b96601a48df20b06bda69e79b1629581","episodeImdb":"tt1971833","site":"clicktoview.org","siteApproved":false,"url":"http://www.clicktoview.org/mzrb9hg1yrz5","user":"crawler"}]},{"_id":"tt2112510","airDate":"2012-06-03","cover":"bb6c89a8ab46c5cd99dcfda3ae778179","episode":10,"genres":["Adventure","Drama","Fantasy"],"linkCount":12,"name":"Valar Morghulis","rating":9.6,"season":2,"seo":"game-of-thrones/s2/e10/valar-morghulis","show":"tt0944947","show_name":"Game of Thrones","synopsis":"As Theon stirs his men to action, Luwin offers some final advice. Brienne silences Ja |
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 _ = require('underscore'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var debug = require('debug')('asset-embed'); | |
module.exports = function() { | |
var self = { | |
loaders: { | |
less: function(a, callback) { | |
self.loaders.plain(a, function(err, res) { |
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
App.Meta = Backbone.Model.extend(initialize: -> | |
# Locate tags and find current values. | |
@$titleTag = $("title") | |
@$titleTag = $("<title></title>").appendTo($("head")) unless @$titleTag.length | |
@$descriptionTag = $("meta[name=\"description\"]") | |
@$descriptionTag = $("<meta name=\"description\" content=\"\" />").appendTo("head") unless @$descriptionTag.length | |
@attributes.title = window.title or @$titleTag.text() | |
@attributes.description = @$descriptionTag.attr("content") | |
@attributes.rendered = false |
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
//not using console.log.apply because of compat *cough*ie*cough* issues) | |
this.socket.emit = _.wrap(this.socket.emit, function (fn, name, message) { | |
console.log('-->', name, _.toArray(arguments).slice(2)); | |
return fn.apply(this, _.toArray(arguments).slice(1)); | |
}); | |
this.socket.$emit = _.wrap(this.socket.$emit, function (fn) { | |
console.log('<--', arguments[1], _.toArray(arguments).slice(2)); | |
return fn.apply(this, _.toArray(arguments).slice(1)); | |
}); |
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.socket.emit = _.wrap(this.socket.emit, function(fn, name) { | |
console.log.apply(this, ['-->', socket.id].concat(_.toArray(arguments).slice(1))); | |
return fn.apply(this, _.toArray(arguments).slice(1)); | |
}); |