Skip to content

Instantly share code, notes, and snippets.

View geludwig's full-sized avatar

Georg geludwig

View GitHub Profile
@geludwig
geludwig / waterfox_keepassxc_integration.md
Created April 14, 2026 10:11
Waterfox with KeePassXC integration on Linux

Requirement: Waterfox and KeepassXC as arch / deb package (no flatpak or snap)

mkdir ~/.waterfox/native-messaging-hosts

ln ~/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json ~/.waterfox/native-messaging-hosts

@geludwig
geludwig / wireguard_vps_setup.txt
Last active November 24, 2025 20:04
Wireguard Tunnel VPS Setup
----------- ------------ | | ------- vps server -------- ------------
| sandbox | ---- | firewall | -- conf0 -- | WAN | ---- | wg_server0 ---- wg_vpn0 | ---- | vpn exit |
----------- ------------ | | | | ------------
| |
| | ------------
| internal | ---- | WAN |
--------------------------- ------------
# conf0:
Protocol Source Port Destination Port Gateway Schedule Description
@geludwig
geludwig / overleaf_guide.md
Last active February 27, 2025 08:20
Overleaf Toolkit Docker Guide
@geludwig
geludwig / abuseipdb_report.sh
Last active February 11, 2025 22:48
Search caddy log and report IPs to AbuseIPDB
#!/bin/bash
### ABUSEIPDB REPORT SCRIPT ###
# Run every 1 minute with crontab (or change TIMER value in this script)!
# Read caddy log (debug must be enabled)
# Extract IP from pattern: "no certificate matching TLS"
# Add ip to abuse.log and delete duplicates (keep oldest)
# Report new ips to AbuseIPDB
# Delete ips older than 14 days from abuse.log
@geludwig
geludwig / docker_cheatsheet.txt
Created December 17, 2024 22:16
Docker cheatsheet and commands.
# AdguardHome Docker command
docker run --name adguardhome\
--net static\
--ip 172.18.0.2\
--restart unless-stopped\
-v /docker/adguard/workdir:/opt/adguardhome/work\
-v /docker/adguard/confdir:/opt/adguardhome/conf\
-p 53:53/tcp -p 53:53/udp\
-p 67:67/udp -p 68:68/udp\
@geludwig
geludwig / esp_gpio_utils.h
Last active October 24, 2024 16:10
Low-level gpio access from ESPHome for ESP32
// Low-level gpio access from ESPHome for ESP32
// Include header file with:
// esphome:
// ...
// includes:
// - esp_gpio_utils.h
// Example
// Call inside yaml using lambda:
@geludwig
geludwig / esphome.yaml
Last active October 10, 2024 10:42
ESPHome ESP32-C6 config (unofficial support in 10/2024)
# ESPHome unofficial config for esp32c6 in 10/2024
# First time flash via "esptool.py" (pip install esptool)
# ESPHome -> Create new device -> give name etc... -> select any device -> replace config -> install -> manually -> download modern format -> flash with esptool.py
# esptool.py --chip esp32c6 --port "/dev/ttyACM0" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x0 <path>/esphome-xiao-esp32c6.factory.bin
# OTA not stable!
substitutions:
name: esphome-xiao
friendly_name: ESPHOME XIAO
@geludwig
geludwig / esphome.yaml
Last active October 8, 2024 10:02
ESPHOME ESP32C3 deepsleep, dual purpose wakeup switch, battery, homeassistant sleep toggle, gpio bitbang
# ESPHome on XIAO ESP32C3 with ESP-IDF Framework
# Battery connected to GPIO4 with 100k voltage divider.
# Reed switch connected to ground and GPIO3 with additional external 1M pullup to 3V3.
# The device can be woken up with the opposite state to the one in which it went to sleep (CONFIG_ESP_SLEEP_GPIO_ENABLE_INTERNAL_RESISTORS: n)
# GPIO BitBang on GPIO10 connected to normal-high signal pin of infrared sensor (external pullup).
# BitBang controlled via microsecond delay. array item[n] pulles gpio low, item[n+1] to high-impedance (signal is normal-high).
# For example two 500us long low pulses with 100us spacing: {500, 100, 500, 1} -> 500us LOW, 100us HIGH, 5000us LOW, HIGH
@geludwig
geludwig / deepsleep.ino
Last active October 4, 2024 11:45
Arduino ESP32C3 - Deep Sleep with ESP_SLEEP_GPIO_ENABLE_INTERNAL_RESISTORS disabled
#define pinWakeup GPIO_NUM_4
void setup(){
pinMode(pinWakeup, INPUT);
Serial.begin(115200);
delay(1000);
Serial.print("Waiting 10s ");
for (byte i=0; i<10; i++)