Skip to content

Instantly share code, notes, and snippets.

View honzasterba's full-sized avatar

Honza Sterba honzasterba

View GitHub Profile
@honzasterba
honzasterba / parallel-requests.js
Created June 13, 2012 09:01
ParallelRequests
/*
This is just an exploration of idea. I don't think this solution is elegant
enough. I'm looking for something that would work without the add() and done()
methods. Something like this:
new ParallelRequests(arrayOfRequests, callbackOnFinished);
The main idea is to work around delays when I need to aggregate data from
various sources before I can do something with them. Chaining is clearly not
the right way to go.
#!/bin/bash
#
# Download and install libevent and memcached from source on Debian Etch or
# Debian Lenny.
#
# Assumptions
# - libevent(1.4) and memcached have not been installed from apt repositories
# - memcached is not already running
# - it is ok to clobber scripts at
# /etc/memcached.conf