Skip to content

Instantly share code, notes, and snippets.

View rdgms's full-sized avatar

Rodrigo Mendes rdgms

  • Mesc.la
  • São Paulo, Brasil.
View GitHub Profile
@rdgms
rdgms / atad.csv
Created May 3, 2016 19:52 — forked from d3noob/.block
Favorite tooltip (complex version)
date close
26-Mar-12 606.98
27-Mar-12 614.48
28-Mar-12 617.62
29-Mar-12 609.86
30-Mar-12 599.55
2-Apr-12 618.63
3-Apr-12 629.32
4-Apr-12 624.31
5-Apr-12 633.68
@rdgms
rdgms / nodejs-ubuntu-bind-port-80.md
Created March 15, 2016 14:51 — forked from vibegui/nodejs-ubuntu-bind-port-80.md
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command:

// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';