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
[feedly] version cookie set to: 14.0 chromeOnBeforeHome.js:4 | |
[feedly][page] loading feedly v.14.0 10101_gc-ui_94.js:1440 | |
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:235 | |
[feedly][ask start] attempt #0 10101_gc-ui_94.js:1440 | |
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:235 | |
[feedly][ask start] attempt #1 10101_gc-ui_94.js:1440 | |
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:235 | |
[feedly][ask start] attempt #2 10101_gc-ui_94.js:1440 | |
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:235 | |
[feedly][ask start] attempt #3 10101_gc-ui_94.js:1440 |
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 whatsOn = []; | |
Collection.findOne({url: 'whats-on'}).populate('children', null, null, {sort: 'position'}).exec(function (error, collection) { | |
async.forEachSeries(collection.children, function (child, callback) { | |
Collection.findAndPopulate({_id: child._id}, function (error, child) { | |
if (child) whatsOn.push(child); | |
callback(); | |
}); | |
}, function (error) { | |
callback(error, whatsOn); | |
}); |
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
async.parallel({ | |
/*collections: function (callback) { | |
Collection.find().populate('parent children').sort('position').exec(callback); | |
},*/ | |
featured: function (callback) { | |
Page.findAndPopulate({ | |
featured: true | |
}, callback); | |
}, | |
whatsOn: function (callback) { |
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
xen: vector 0x2 is not implemented | |
INFO: rcu_sched detected stalls on CPUs/tasks: | |
6: (1069827 ticks this GP) idle=6d7/140000000000001/0 softirq=1605491/1605491 | |
7: (1 GPs behind) idle=cf5/140000000000000/0 softirq=1583740/1583741 | |
(detected by 5, t=1692160 jiffies, g=3466343, c=3466342, q=222678) |
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
- app | |
- subapp | |
- html/js/css | |
- subapp2 | |
- html/js/css | |
- shared html/js/css (subapps will inherit from this) |
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 Restify = require('cms-restify') | |
, modelify = require('cms-modelify') | |
, routify = require('cms-routify') | |
, users = {}; | |
module.exports = function (app, db) { | |
users.model = modelify('User', { | |
email: { | |
type: String, | |
required: true |
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 _ = require('underscore') | |
, path = require('path'); | |
var Restify = function(options) { | |
if (!options) return new Error('Options must be provided'); | |
if (!options.Model) { | |
return new Error('Options must contain \'Model\''); | |
} else { | |
this.Model = options.Model; |
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
routes.get('/', controller.index(controller)); | |
controller.index = function (controller) { | |
return function (req, res, next) { | |
}; | |
}; |
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
for (var object in fields) { | |
req.body[object] = {}; | |
for (var param in fields[object]) { | |
req.body[object][param] = Array.isArray(fields[object][param]) ? fields[object][param][0] : fields[object][param]; | |
} | |
} |
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
Restify.prototype.handleFiles = function (req, res, next) { | |
var form = new multiparty.Form(); | |
form.parse(req, function (error, fields, files) { | |
fields = qs.parse(fields); | |
for (var object in fields) { | |
req.body[object] = {}; | |
for (var param in fields[object]) { | |
req.body[object][param] = Array.isArray(fields[object][param]) ? fields[object][param][0] : fields[object][param]; | |
} |