I wouldn't be so alone
If my Github followers lived in my home
Alex Russell would send a pull request
But I'd be too busy
Return to San Francisco by nine
var cluster = require('cluster'); | |
var app = require('./app'); | |
// Comment this out: | |
// var server = cluster(app) | |
// .use(cluster.pidfiles()) | |
// .use(cluster.cli()) | |
// .use(cluster.stats()) | |
// .use(cluster.repl('/var/run/colab-rest-api.sock')); |
if (cluster.isMaster){ | |
// Fork workers. | |
for (var i = 0; i < 2; i++) { | |
cluster.fork() | |
} | |
console.log('Forked ' + numCPUs + ' workers.') | |
cluster.on('death', function(worker) { | |
// we need to spin back up on death |
function bindKeyboard(){ | |
// CMD+s TO SAVE DOC | |
var command = { | |
name: "save", | |
bindKey: { | |
mac: "Command-S", | |
win: "Ctrl-S" | |
}, | |
exec: function(){ |
var mongoose = require('mongoose') | |
, Server = require('mongodb').Server | |
, ReplSetServers = require('mongodb').ReplSetServers | |
, http = require('http') | |
var set = 'mongodb://cihcisdapp809v:27077,mongodb://cihcisdapp809v:37077' | |
// https://github.com/christkv/node-mongodb-native/blob/master/lib/mongodb/connections/repl_set_servers.js#L32 | |
var replSet = new ReplSetServers([ | |
new Server( 'mongodb://cihcisdapp809v', 27077, { auto_reconnect: true } ), |
I wouldn't be so alone
If my Github followers lived in my home
Alex Russell would send a pull request
But I'd be too busy
Return to San Francisco by nine
/** | |
* vintageJS is a jQuery plugin that uses the HTML5 canvas element to add a vintage look to images | |
* | |
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) | |
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. | |
* | |
* Built on top of the jQuery library | |
* http://jquery.com | |
* | |
* |
server { | |
listen 80; | |
server_name subprint.com; | |
access_log /var/www/subprint/logs/access.log; | |
error_log /var/www/subprint/logs/error.log; | |
root /var/www/subprint/server/public; # express serves static resources for subprint.com out of here | |
location / { |
!function(d,w){ | |
var debug = true | |
/* | |
* @desc Lose the URL bar for mobile version by sliding screen up. | |
* @return void | |
*/ | |
function scrollUp(delay){ |
{ | |
"VERSION": "0.0.1", | |
"JSHINT_OPTS": { "browser": true }, | |
"JAVASCRIPT": { | |
"DIST_DIR": "./public/js", | |
"code": [ "./public/js/code.js"] | |
}, | |
"CSS": { | |
"DIST_DIR": "./public/css", | |
"style": ["./public/css/style.css"] |
<div id="main"> | |
</div> |