Skip to content

Instantly share code, notes, and snippets.

@ergosteur
ergosteur / Get-Wifi-Profile-Analyzer.ps1
Created December 10, 2025 21:51
PowerShell script that analyzes Windows Wi-Fi profiles to extract SSID, Security, and Certificate Trust details.
<#
.SYNOPSIS
Analyzes Windows Wi-Fi profiles to extract SSID, Security, and Certificate Trust details.
.DESCRIPTION
This tool provides a detailed analysis of Wi-Fi connection profiles, specifically focusing on
Enterprise (802.1X) security settings. It extracts the Trusted Root CA Thumbprint, Server
Name constraints, and validates if the required certificates are present in the local machine store.
It operates in three modes:
@ergosteur
ergosteur / fix-ups-permissions.sh
Created November 12, 2025 03:07
script to fix USB permissions for NUT (Network UPS Tools)
#!/bin/bash
# fix-ups-permissions.sh
# Standalone script to fix USB permissions for NUT (Network UPS Tools)
set -e
if [ "$EUID" -ne 0 ]; then
echo "ERROR: Please run as root or with sudo." >&2
exit 1
fi
@ergosteur
ergosteur / encode-targetsize-43-crop.sh
Created September 23, 2025 22:45
encode-ntsc-43-improved.sh - Batch encode videos to NTSC 4:3 with hardware accel (multi-OS)
#!/usr/bin/env bash
#
# encode-targetsize-43-crop.sh - Batch encode videos to NTSC 4:3 with hardware accel (multi-OS)
# Targeting iGPUs (Apple Silicon, Intel HD, Intel Arc)
# Uses VideoToolbox on macOS, VAAPI on Linux, and QuickSync on Windows.
#
set -euo pipefail
# --- Default Settings ---
VIDEO_BITRATE="1500k"
@ergosteur
ergosteur / LinkExtractorUserscript.js
Created September 13, 2025 21:40
Extract Links (Universal, Configurable Patterns) - Universal lazy-scroll link extractor with config, HUD, stop button, and Tampermonkey menu
// ==UserScript==
// @name Extract Links (Universal, Configurable Patterns)
// @namespace ergosteur
// @version 2.9
// @description Universal lazy-scroll link extractor with config, HUD, stop button, and Tampermonkey menu
// @match *://*/*
// @grant GM_registerMenuCommand
// ==/UserScript==
(function () {
@ergosteur
ergosteur / ssh-protocol-handler.bat
Last active September 19, 2025 15:37
Basic ssh protocol handler for Windows or Linux. No external dependencies other than OpenSSH, optional Zenity for graphical dialog on Linux. Place somewhere on your local drive. Run once as admin to register the protocol handler in the registry (xdg on Linux). Enables clicking ssh:// links in browser, and in the Run dialog.
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
REM ============================================================================
REM == Simple SSH Link Protocol Handler for Windows ==
REM == Uses the built-in Windows OpenSSH client. ==
REM == Includes self-installing registry setup. ==
REM == To install, right-click and "Run as administrator". ==
REM == ==
REM == Public Domain. https://tcpip.wtf (Modified from original) ==
@ergosteur
ergosteur / make-firefox-ssb.sh
Last active September 9, 2025 17:57
Firefox SSB Creator - Linux Firefox "Web App"
#!/bin/bash
# --- Script to create a Firefox Single-Site Browser (SSB) ---
# V8: Implements a slim, auto-hiding toolbar instead of a fully hidden one.
# Original idea /u/Apoema - https://www.reddit.com/r/firefox/comments/li2lqg/comment/gn2sltw/
# Made with AI assistance in case you couldn't tell by the excessive use of emoji.
echo "🔥 Firefox SSB Creator (v8) 🔥"
echo "------------------------------"
#!/usr/bin/env bash
# setup-git-email-enforcer.sh
# This script enforces using the GitHub anon email for all commits.
GOOD_EMAIL="[email protected]"
HOOKS_DIR="$HOME/.git-hooks"
HOOK_FILE="$HOOKS_DIR/commit-msg"
# Create hooks dir if it doesn't exist
mkdir -p "$HOOKS_DIR"
@ergosteur
ergosteur / import-ova-pve.py
Created July 6, 2025 01:19
Script to import OVA/OVF appliances into Proxmox VE
#!/usr/bin/env python3
import os
import sys
import tarfile
import tempfile
import subprocess
import xml.etree.ElementTree as ET
import argparse
import shutil
@ergosteur
ergosteur / DNS_DHCPLeaseEvent.rsc
Created April 23, 2025 02:54
DHCP Lease Event Script for Mikrotik to automatically add DNS A records for new IPv4 DHCP Leases
# DNS_LeaseEvent
# Handles a single DHCP lease bind or release/expire event
# 1) Locate the exact lease by its MAC & IP
:local leaseId [/ip dhcp-server lease find where mac-address=$leaseActMAC and address=$leaseActIP]
:if ($leaseId = "") do={
:log warning "DNS_LeaseEvent: lease not found for $leaseActMAC / $leaseActIP, aborting"
:return
}
@ergosteur
ergosteur / letsencrypt-mikrotik-docker-acme.md
Created April 23, 2025 01:03
Automated Let’s Encrypt on MikroTik via acme.sh Container

Automated Let’s Encrypt on MikroTik via acme.sh Container

(in 13 lucky steps)


This guide shows how to run acme.sh in a RouterOS container on your USB drive, use Cloudflare DNS‑01, and deploy certs via SSH to RouterOS automatically.

0. Initial Docker Configuration