Skip to content

Instantly share code, notes, and snippets.

View jeanpauldejong's full-sized avatar
😄
Just changing the world, one line of code at a time.

Jean-Paul de Jong jeanpauldejong

😄
Just changing the world, one line of code at a time.
View GitHub Profile
@jeanpauldejong
jeanpauldejong / enable-swapfile-ubuntu.md
Last active June 27, 2025 08:27
Enable Swap on Ubuntu

Enable Swap on Ubuntu

Create a swap file on Ubuntu to increase system performance by allowing the system to use disk space as virtual memory.

Create a 2GB swap file:

sudo fallocate -l 2G /swapfile

If fallocate is not available, you can use dd:

@jeanpauldejong
jeanpauldejong / resize-volume-ubuntu-cloud-scaleway.md
Last active June 27, 2025 10:07
Resize Disk and Grow Filesystem on Ubuntu (Cloud e.g. Scaleway)

Resize the Volume of an Ubuntu Cloud Instance e.g. on Scaleway

First check that you have the cloud-guest-utils package installed:

dpkg -l | grep cloud-guest-utils

If it is not installed, you can install it with:

@jeanpauldejong
jeanpauldejong / mautic-ubuntu-nginx-mariadb-installation.md
Last active July 8, 2025 08:16
Mautic on Ubuntu 24.04 with Nginx, MariaDB, PHP8.3 and composer.

Install Mautic on Ubuntu 24.04 LEMP Server

This guide assumes you have provisioned your server with a LEMP stack (Nginx, MariaDB, PHP 8.3) using cloud-init-lemp.yml. It covers secure MariaDB setup, Composer installation, Mautic deployment, and HTTPS configuration for mautic.example.com.

1. Secure MariaDB and Create Database/User

Set your passwords and database info as needed. Replace all placeholders!

# Secure MariaDB (set root password, remove test DB, etc.)
@jeanpauldejong
jeanpauldejong / nginx-reverse-proxy-letsencrypt.md
Last active June 25, 2025 10:32
Nginx Reverse Proxy with Let's Encrypt (Certbot Standalone) & TLS Hardening

Nginx Reverse Proxy with Let’s Encrypt (Certbot Standalone) & TLS Hardening

This guide shows how to use Nginx as a reverse proxy with a legitimate Let’s Encrypt certificate, using Certbot in standalone mode (no need to reconfigure Nginx for HTTP-01 challenge). It also covers certificate renewal testing and TLS hardening in Nginx.

Prerequisites

  • Ubuntu 22.04/24.04 server (or similar)
  • Domain name pointed to your server’s public IP
  • Nginx installed (sudo apt install nginx)
  • Ports 80 and 443 open in your firewall
@jeanpauldejong
jeanpauldejong / 00_ubuntu-2404-initial-setup.md
Last active July 4, 2025 07:22
Ubuntu 24.04 LTS Initial Setup & Hardening

Ubuntu 24.04 Initial Setup & Hardening Guide

A concise, step-by-step guide for securing and configuring a fresh Ubuntu 24.04 server.

Alternatively you can skip the text and use the cloud-init script files cloud-init.yaml, cloud-init-docker.yaml, cloud-init-lemp.yaml, or cloud-init-nginx-proxy.yml for an automated setup.

Base Installation

  • Deploy the official Ubuntu 24.04 LTS image from your cloud provider or ISO.
  • Log in as the default user (or via SSH key if provided).
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active July 27, 2025 23:09
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@nuga99
nuga99 / docker-install-parrot.sh
Last active May 5, 2025 15:21
Install Docker Engine on Parrot OS (2023)
#!/bin/sh
# From https://www.hiroom2.com/2017/09/24/parrotsec-3-8-docker-engine-en/
# Changelog:
# @DavoedM: Apr 3, 2020
# @C922A10971734: Jan 19, 2023
set -e
# Install dependencies.