Skip to content

Instantly share code, notes, and snippets.

View supermarsx's full-sized avatar
πŸ’«

Mariana supermarsx

πŸ’«
  • Ξ” on earthβ„’
  • 16:28 (UTC +01:00)
View GitHub Profile
@supermarsx
supermarsx / reverse-nginx-rds.conf
Created October 20, 2025 15:49
Reverse proxy setup to access RDP Remote Apps portal, useful for SSL Certificate setup.
location /rpc/ {
proxy_pass https://IPADDRESS/rpc/;
proxy_ssl_server_name on;
proxy_ssl_verify off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_buffering off;
@supermarsx
supermarsx / iisstart.html
Last active October 20, 2025 15:44
Simple drop-in replacement for an easy RDWeb redirect. Simple IIS RDS redirect
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="0; URL='/RDWeb'"/>
<script>window.location.href='/RDWeb';</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Please wait...</title>
</head>
<body>
<h1>Please wait...</h1>
@supermarsx
supermarsx / exchange-remove-auto-mapping.ps1
Created September 8, 2025 15:06
Exchange remove auto mapping mailboxes for user
# Set the user to fix
$user = "DOMAIN\UserName"
# Reapply FullAccess with AutoMapping disabled on every mailbox where the user currently has FullAccess
Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox,SharedMailbox,RoomMailbox,EquipmentMailbox |
Where-Object {
Get-MailboxPermission -Identity $_.Identity -User $user -ErrorAction SilentlyContinue |
Where-Object { $_.AccessRights -contains "FullAccess" -and -not $_.IsInherited }
} | ForEach-Object {
Remove-MailboxPermission -Identity $_.Identity -User $user -AccessRights FullAccess -Confirm:$false
@supermarsx
supermarsx / prompt-codex-cli-agents-instruction.md
Created September 7, 2025 10:39
Codex CLI agents.md generation instruction/prompt

Generate a file named AGENTS.md that serves as a contributor guide for this repository. Your goal is to produce a clear, concise, and well-structured document with descriptive headings and actionable explanations for each section. Follow the outline below, but adapt as needed β€” add sections if relevant, and omit those that do not apply to this project.

Document Requirements

  • Title the document "Repository Guidelines".
  • Use Markdown headings (#, ##, etc.) for structure.
@supermarsx
supermarsx / wifiqr.sh
Created August 27, 2025 17:32
Wi-Fi QR Forge, create QR codes for Wi-Fi networks fast
#!/usr/bin/env bash
# Wi‑Fi QR Forge β€” a Wi‑Fi QR code generator with optional password creation
#
# Requirements: qrencode (preferred). Optional: xclip/wl-copy/pbcopy to copy payload to clipboard.
#
# Examples:
# ./wifiqr.sh -s "MySSID" -p "s3cretpass" -t WPA -o ./mywifi.png
# ./wifiqr.sh -s "CafΓ© do Bairro" -t nopass -f ansi # print QR to terminal
# ./wifiqr.sh -s Net -g 16 -o wifi.svg -f svg -C # generate 16‑char password, SVG, copy payload
# ./wifiqr.sh -s Net -p pass -o out.png -R # add R:1 (WPA3 transition mode disabled)
@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.