Skip to content

Instantly share code, notes, and snippets.

@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@AndrewRayCode
AndrewRayCode / gist:825583
Created February 14, 2011 07:15
recursive read directory in node.js returning flattened list of files and directories
function readDir(start, callback) {
// Use lstat to resolve symlink if we are passed a symlink
fs.lstat(start, function(err, stat) {
if(err) {
return callback(err);
}
var found = {dirs: [], files: []},
total = 0,
processed = 0;
function isDir(abspath) {
Strophe.addConnectionPlugin('connectionmanager', {
pingTime: 10000, // the time in ms between each ping
timeoutTime: 8000, // the time in ms to wait for a ping to return
pingInterval: null,
connection: null,
init: function(connection) {
this.connection = connection;
},