Skip to content

Instantly share code, notes, and snippets.

View sarenodev's full-sized avatar
💻

ELADIO SARENO JR sarenodev

💻
View GitHub Profile
@sarenodev
sarenodev / README.md
Created March 3, 2026 15:09
n8n Production Setup — Queue Mode with PostgreSQL & Redis (Docker Compose)

n8n Production Setup — Queue Mode with PostgreSQL & Redis (Docker Compose)

A production-ready n8n stack running in queue mode with PostgreSQL for persistence and Redis as the job queue. Executions are offloaded from the main server to dedicated worker containers.

Architecture

           ┌─────────────┐
  Browser  │  n8n_server │  (UI + webhook receiver)
 ──────► │ :5678 │
@sarenodev
sarenodev / README.md
Last active December 9, 2025 07:22
Easy-Wireguard

Docker Compose

File: docker-compose.yaml

volumes:
  etc_wireguard:

services:
  wg-easy:
    environment:
    #  Optional:
@sarenodev
sarenodev / README.md
Created August 29, 2025 08:17
UFW but AWS Security Group-like

UFW but AWS Security Group-like

ufw-rules.sh:

#!/usr/bin/env bash
# ufw-rules.sh — Minimal AWS-SG style UFW (IPv4)
# Usage: sudo ./ufw-rules.sh
set -euo pipefail

# --- safety -------------------------------------------------------------------
@sarenodev
sarenodev / README.md
Created May 18, 2025 07:54
PostgreSQL Dump/Restore (data only)

Create backup on the source database

Note:

Owner and privileges are excluded.

pg_dump -U src_db_user -h src-db.example.com -d src_db_name --no-owner --no-privileges -F c -f mybackup-yyyMMddHHmmss.dump

Restore backup to the destination database

Create backup first before restoring

@sarenodev
sarenodev / README.md
Created April 2, 2025 04:54
AWS S3 IP whitelisting using Bucket Policy

Bucket Policy

There are cases where we need to restrict IPs from accessing S3 bucket. But we also know that it's not possible to use Security Groups in S3 buckets. Luckily, there's a Bucket Policy where we can add IP restrictions that will act as a Firewall.

Example

{
    "Version": "2012-10-17",
 "Statement": [
@sarenodev
sarenodev / Dockerfile
Created March 20, 2025 04:22 — forked from shyd/Dockerfile
install locales inside a docker image
FROM debian
RUN apt-get update && \
apt-get install -y \
locales && \
rm -r /var/lib/apt/lists/*
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales
@sarenodev
sarenodev / README.md
Created July 3, 2024 09:37
Instaling WordPress+Nginx on CentOS Stream 9
$ sudo -i
$ dnf update
$ dnf install tmux -y

# Fix known issue with CentOS/Redhat. Ref: https://stackoverflow.com/a/68841102/8724367
$ setsebool -P httpd_can_network_connect 1

# Add 4GB Swap. Ref https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7#create-a-swap-file
$ dd if=/dev/zero of=/swapfile count=4096 bs=1MiB
@sarenodev
sarenodev / README.md
Created July 3, 2024 09:33
Instaling WordPress+Nginx on Ubuntu 22.04
$ sudo -i
$ whoami
root
$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
@sarenodev
sarenodev / openssl_commands.md
Created February 1, 2024 00:47 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@sarenodev
sarenodev / README.md
Created January 30, 2024 09:51 — forked from stokito/README.md
Cryptography GUI tools: OpenSSL GUI, keys management, PKI, PGP/GPG GUI

OS tools and user friendly cryptography GUI tools

Windows Certificate Manager Tool (certmgr.msc) Manage storage for x509 keys. No support for PGP/GPG. Can't sign or encode, can't generate a key. You can use IIS webserver managemnt console to generate a cert.Proprietary

certmgr screenshot

GNOME Seahorse GUI for SSH keys, X509 certs, PGP/GPG. Linux only.