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'), | |
cluster = require('cluster'), | |
http = require('http'), | |
numCPUs = require('os').cpus().length, | |
basePort = 1100; | |
var app = express(); | |
app.use(express.cookieParser()); | |
app.use(express.logger('short')); | |
app.use(express.session({ |
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
#!/bin/sh | |
# | |
# simulate_3g.sh - Simulate a sluggish 3G network with delays & packet loss | |
# Usage: simulate_3g.sh 8080 8081 | |
# Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
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
/** | |
* Simple test of LeapMotion in node.js | |
*/ | |
var Leap = require('leapjs'); | |
var controller = new Leap.Controller({enableGestures: true}) | |
.connect() | |
.on('frame', function(frame){ | |
var hand = frame.hands[0]; | |
if (hand) { |