OS X ならHomebrewまたはMacportsで。
[~] $ brew install node
[~] # port install node
nodeコマンドでnodeのインタプリタを起動。
var FS = require('fs'); | |
var EventEmitter = require('events').EventEmitter; | |
// http://www.mjmwired.net/kernel/Documentation/input/joystick-api.txt | |
function parse(buffer) { | |
var event = { | |
time: buffer.readUInt32LE(0), | |
number: buffer[7], | |
value: buffer.readInt16LE(4) | |
} |
#!/bin/bash | |
_TCP_PORT=`jot -r 1 10000 65000` | |
while : | |
do | |
# Check to see if this port is allocated | |
lsof -i 4TCP:$_TCP_PORT || break | |
_TCP_PORT=`jot -r 1 10000 65000` | |
done | |
node-inspector --web-port=$_TCP_PORT & |
/** | |
* Read Linux mouse(s) in node.js | |
* Author: Marc Loehe ([email protected]) | |
* | |
* Adapted from Tim Caswell's nice solution to read a linux joystick | |
* http://nodebits.org/linux-joystick | |
* https://github.com/nodebits/linux-joystick | |
*/ | |
var fs = require('fs'), |
If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.
This is a work in progress - it may not work!
HTTP Archive (powered by HAR files): www.httparchive.org
HAR Viewer: http://code.google.com/p/harviewer/
/* | |
This library was developed by Will Honey. | |
It is licensed under the GPLv3 Open Source License | |
This library requires the underscore library found at http://documentcloud.github.com/underscore/ | |
This library requires the underscore string library found at http://edtsech.github.com/underscore.string/ | |
This library requires the support of localStorage. Updates could be easily made to change that. | |
*/ | |
/* jslint adsafe: false, devel: true, regexp: true, browser: true, vars: true, nomen: true, maxerr: 50, indent: 4 */ |