Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Lucio Paiva luciopaiva

I may be slow to respond.
View GitHub Profile
from tornado.testing import AsyncHTTPTestCase, gen_test
from tornado.web import Application
from tornado.web import RequestHandler
from tornado.gen import coroutine, Return
class HelloHandler(RequestHandler):
markdaws / flushStdOutAndErrOnExit
Created Aug 11, 2011
Shutting down node.js and flushing stdout and stderr
View flushStdOutAndErrOnExit
function flushAndShutdown(exitCode) {
if(process.stdout.flush()) {
else {
process.stdout.on('drain', function() {
isaacs /
Last active Dec 23, 2021
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh