Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobie Langel tobie

View GitHub Profile
@tobie
tobie / notes.md
Created Jul 20, 2018 — forked from calebamiles/notes.md
Notes on Open Source Governance Models
View notes.md

Node.js Foundation

  • Healthy Open Source
    • explicit goal to be a lightweight process
    • concrete ability to scale to hundreds of contributors
    • good fundamental goals
      • transparency
      • participation
      • efficacy
    • ecosystem projects encouraged but not required to adopt foundation governance templates
    • creation of projects under TSC explicity delegates authority from TSC to project TC
View original.js
function load(fixtures, onComplete) {
async.parallel(fixtures.map(function(fixture) {
return function(cb) {
store(fixture, function(err, result) {
cb(err, result);
});
};
}), onComplete);
}
@tobie
tobie / latency.txt
Created May 31, 2012 — forked from jboner/latency.txt
Latency numbers every programmer should know
View latency.txt
ns
L1 cache reference .......................... 0.5
Branch mispredict ........................... 5
L2 cache reference .......................... 7
Mutex lock/unlock .......................... 25
Main memory reference ..................... 100
Compress 1K bytes with Zippy ............ 3,000
Send 2K bytes over 1 Gbps network ...... 20,000
Read 1 MB sequentially from memory .... 250,000
Round trip within same datacenter ..... 500,000
@tobie
tobie / modulr-node-test.js
Created Dec 13, 2011 — forked from dandean/modulr-node-test.js
modulr-node search paths
View modulr-node-test.js
require('modulr').buildFromPackage(__dirname, function(e, result) {
if (e) {
throw e;
}
console.log(result);
});
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
View snippet.js
var sys = require('sys'),
fs = require('fs'),
path = require('path');
function rmrf(file, callback) {
fs.stat(file, function(err, stat) {
if (err) return callback(err);
if (stat.isFile()) return fs.unlink(file, callback);
var dir = file;