Skip to content

Instantly share code, notes, and snippets.

View luciopaiva's full-sized avatar
🐌
I may be slow to respond

Lucio Paiva luciopaiva

🐌
I may be slow to respond
View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ 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 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 https://www.npmjs.org/install.sh | sh
@markdaws
markdaws / flushStdOutAndErrOnExit
Created August 11, 2011 22:11
Shutting down node.js and flushing stdout and stderr
function flushAndShutdown(exitCode) {
if(process.stdout.flush()) {
process.exit(exitCode);
}
else {
process.stdout.on('drain', function() {
process.exit(exitCode);
})
}
}
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):
@coroutine
@thebuilder
thebuilder / jest.config.js
Last active October 29, 2022 02:42
Use Jest Projects to run both JSDom and Node tests in the same project
module.exports = {
projects: [
{
displayName: 'dom',
testEnvironment: 'jsdom',
snapshotSerializers: ['enzyme-to-json/serializer'],
testMatch: ['**/__tests__/**/*.test.js?(x)']
},
{
displayName: 'node',
@luciopaiva
luciopaiva / aseprite-clion.md
Last active March 5, 2022 13:56
How to build aseprite via CLion on Windows

ase128 clion_logo_300x300a

The aseprite docs help with building it from the command line. Here I show how to build it via CLion. It is surprinsingly simple!

First, follow the instrucions in INSTALLATION.md. I will summarize here what I had to follow when building tag v1.3-beta11:

  1. Clone the repo with its submodules;
  2. Either stay in the main branch or switch to the desired tag. For example, this is how I switched to v1.3-beta11:

git checkout tags/v1.3-beta11 -b v1.3-beta11