Skip to content

Instantly share code, notes, and snippets.

View reegodev's full-sized avatar

Matteo Rigon reegodev

  • folk.app
  • Padova, Italy
View GitHub Profile
@reegodev
reegodev / test.js
Created November 25, 2022 14:00
Trigger too many connections error
const axios = require('axios');
const APP_URL = 'https://meek-forgetful-play-dnk3e.ondigitalocean.app';
const TOKEN = 'eyJhbGciOiJ...';
const sendRequest = async (endpoint) => {
try {
await axios.get(`${APP_URL}${endpoint}`, {
headers: {
authorization: `Bearer ${TOKEN}`,
@reegodev
reegodev / cryptography.js
Last active September 2, 2022 12:35
Node encryption/decryption with aes-256-gcm
const crypto = require('crypto');
const assert = require('assert');
const algorithm = 'aes-256-gcm';
// From env
const password = 'CDcmzxwnDgJ581XYOJqBqWdbVDcdsSGr';
const encrypt = (message, salt) => {
const iv = crypto.randomBytes(16);
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@reegodev
reegodev / 1-preparation.md
Last active December 30, 2018 17:44
OSX Dev setup