Skip to content

Instantly share code, notes, and snippets.

guifromrio /
Last active January 10, 2024 22:47
Allow Node.js to bind to privileged ports without root access on Ubuntu

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


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:

rxaviers / gist:7360908
Last active June 22, 2024 22:09
Complete list of github markdown emoji markup


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
naholyr /
Last active December 5, 2023 23:37
Chrome extension exposing JS API


Clone the repo and drop the folder into "chrome://extensions" page.


Open any web page ("about:blank" will work too) and a console, then inspect and play with MY_API global variable.

wizioo /
Last active June 14, 2024 10:25
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch


My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.


My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

kost / esp8266-wifi-beacon-generator.ino
Created April 16, 2016 15:14
ESP8266 WiFi Beacon Generator - Generate SSID beacon frames on ESP8226
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
byte channel;
int maxssids=10; /* how much SSIDs we have */
char *ssids[] = {
cagataycali /
Created July 8, 2016 16:28
Start pm2 process with babel-node interpreter
pm2 start app.js --interpreter ./node_modules/.bin/babel-node
thacoon / arch-linux-gnome-install
Last active March 22, 2024 06:48
Install a minimal gnome setup and some more useful things
# Install Gnome and some other useful thins
# The official installation guide ( contains a more verbose description.
# And based on
# I have just copied commands from
# It's just to have it with one view after doing a [fresh installation](
# Some useful services
pacman -S acpid ntp dbus cups cronie
ksmithut / .dockerignore
Last active June 2, 2024 21:43
Node Docker Compose nodemon
Ynn / main.cpp
Created February 14, 2018 15:56
esp8266 : sniff, send in udp, then sniff another channel
#include <Arduino.h>
#ifdef ESP8266
extern "C" {
#include "user_interface.h" //to gain access to promiscuous mode
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
setTimeout(function() {
function getAllModules() {
return new Promise((resolve) => {
const id = _.uniqueId("fakeModule_");
[id]: function(module, exports, __webpack_require__) {