Skip to content

Instantly share code, notes, and snippets.

View marcusgreenwood's full-sized avatar
🤖
robots rock 🎶

Marcus Greenwood marcusgreenwood

🤖
robots rock 🎶
View GitHub Profile
@marcusgreenwood
marcusgreenwood / gist:4951476
Created February 14, 2013 09:08
Nginx 1s microcaching config for Hatch.js.
events {
worker_connections 1024;
}
http {
# Set cache dir
proxy_cache_path /var/cache/nginx levels=1:2
keys_zone=microcache:5m max_size=1000m;
# Virtualhost/server configuration
@anatoliychakkaev
anatoliychakkaev / benchmark.js
Created October 12, 2012 12:54
Benchmark sample
var score = 0;
var started = 0;
var http = require('http');
require('./server');
function request(params, callback) {
var req = new http.IncomingMessage;
req.headers = {host: params.host};
req.url = params.path;
@thomasfr
thomasfr / gist:3541551
Created August 30, 2012 21:28
One liner to get latest stable version of node.js
curl --insecure -# -sSL http://nodejs.org/dist/ | sed -n -E "s/.*([0-9]+\.[0-9]+\.[0-9]+).*/\1/gp" | sort -u -k 1,1n -k 2,2n -k 3,3n -t . | tail -n1