Skip to content

Instantly share code, notes, and snippets.

View supermarsx's full-sized avatar
💫

Mariana supermarsx

💫
  • Δ on earth™
  • 06:53 (UTC)
View GitHub Profile
@supermarsx
supermarsx / docker-nmcli-bridge-cleaner.sh
Last active August 27, 2025 17:07
Docker Bridges cleaner, cleanup all configured docker bridges on network manager
#!/usr/bin/env bash
#
# docker-nmcli-bridge-cleaner.sh
# ------------------------------------------------------------
# Delete NetworkManager connections whose NAME matches a regex
# (defaults to "^br-" for Docker-style bridges). Shows a pretty
# preview table, detects Docker/Podman/Libvirt/LXD/Incus, warns
# when a connection is active or likely managed by those stacks,
# supports dry-run, backups, and safety skips.
#
@supermarsx
supermarsx / docker-nat-modules.sh
Created August 26, 2025 15:33
Docker NAT enabler, solve nat, iptables errors when using DinD (Docker in Docker)
#!/usr/bin/env bash
# docker-nat-modules.sh — Detect, load & persist required iptables/NAT kernel modules
# Safe to run multiple times; will only add missing modules to persistence.
# ────────────────────────────────────────────────────────────────────────────────
# Config
CANDIDATE_MODULES=(
ip_tables
iptable_nat
nf_nat
@supermarsx
supermarsx / Block-SuspiciousTlds.ps1
Last active August 26, 2025 15:17
Exchange filter, Block Suspicious TLDs
# =========================================================
# 🚨 Block Suspicious TLDs – Transport Rule Manager 🚨
# =========================================================
$blacklist = @(
"@*\.accountant$","@*\.accountants$","@*\.adult$","@*\.am$","@*\.asia$","@*\.autos$",
"@*\.bar$","@*\.bd$","@*\.best$","@*\.bet$","@*\.bid$","@*\.bio$","@*\.blue$","@*\.buzz$",
"@*\.cam$","@*\.casa$","@*\.casino$","@*\.cc$","@*\.cd$","@*\.cf$","@*\.cfd$","@*\.charity$",
"@*\.click$","@*\.club$","@*\.cm$","@*\.cn$","@*\.com.na$","@*\.country$","@*\.cricket$",
"@*\.cyou$","@*\.dad$","@*\.date$","@*\.degree$","@*\.download$","@*\.earth$","@*\.email$",
@supermarsx
supermarsx / docker-health-checks.md
Last active August 26, 2025 15:59
Docker Compose Healthchecks for containers

Docker Compose Healthchecks

Healthchecks let Docker verify that a container is actually ready and responding (not just “running”). This README gives you:

  • A 2‑minute intro to how healthchecks work in Compose
  • Ready‑to‑paste examples for common services (MariaDB, Nextcloud FPM, Nginx, Portainer, Gitea, Registry, Redis, Drone…)
  • Patterns, best practices, and troubleshooting tips
  • How to wire healthchecks into depends_on so stacks start in the right order

@supermarsx
supermarsx / sysctl.conf
Last active August 26, 2025 16:23
Docker sysctl.conf master file
# Docker-tailored sysctl.conf
# ------------------------------------------------------------
# These settings are tuned for Linux hosts running Docker/containers
# (bridge networks, veth pairs, NAT/masquerade, overlay/ingress in Swarm).
# Notes focus on packet bursts from containers, conntrack/NAT behavior,
# asymmetric routing across bridges, and handling spikes from L4/L7 load balancers.
#
# IMPORTANT:
# - These are host-level sysctls. Some can also be applied per-container with
# `docker run --sysctl key=value`, but many only make sense on the host.
@supermarsx
supermarsx / nmcli-rm-docker-bridges.sh
Created December 16, 2024 16:11
Remove all docker bridges with nmcli
nmcli connection show | awk '/^br-/ {print $1}' | xargs -I {} nmcli connection delete {}
@supermarsx
supermarsx / wifiqrcode.txt
Created November 13, 2024 13:28
Wi-Fi QR code generation string
WIFI:S:networkname;T:WPA;P:password;;
@supermarsx
supermarsx / fix0x8004011c.cmd
Created October 22, 2024 17:12
Fix 0x8004011c Outlook with IMAP
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb" /v ProtectionPolicy /t REG_DWORD /d 1 /f
@supermarsx
supermarsx / AddDcoAdapter.cmd
Created August 15, 2024 16:29
Add OpenVPN DCO Adapter
cd "C:\Program Files\OpenVPN\bin\"
.\tapctl.exe create --hwid ovpn-dco
@supermarsx
supermarsx / header_checks
Created August 15, 2024 13:41
Postfix Scrub received headers, header_checks
/^Received:.*/ IGNORE
/^x-originating-ip:.*/ IGNORE