Skip to content

Instantly share code, notes, and snippets.

View tobie's full-sized avatar

Tobie Langel tobie

View GitHub Profile
@tobie
tobie / snippet.js
Created August 23, 2010 00:53 — forked from samleb/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;
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
@tobie
tobie / modulr-node-test.js
Created December 13, 2011 08:33 — forked from dandean/modulr-node-test.js
modulr-node search paths
require('modulr').buildFromPackage(__dirname, function(e, result) {
if (e) {
throw e;
}
console.log(result);
});
@tobie
tobie / latency.txt
Created May 31, 2012 08:43 — forked from jboner/latency.txt
Latency numbers every programmer should know
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 / original.js
Last active December 12, 2015 04:19 — forked from DavidBruant/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 / notes.md
Created July 20, 2018 05:39 — forked from calebamiles/notes.md
Notes on Open Source Governance Models

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