Skip to content

Instantly share code, notes, and snippets.

@charlie89
charlie89 / ahk_darkmode.ahk
Last active November 23, 2025 18:41
AutoHotkey v2 Dark Mode
#Requires AutoHotkey v2.0
; This script creates a dark mode for specific windows by inverting their colors.
; It uses the Windows Magnifier in the background for the color inverting, but it only inverts just the rectangle in place
; of the specific windows, NOT the whole screen like the Magnifier applicaion does. This is possible through DLL calls.
; Big thanks to the original source at https://www.autohotkey.com/boards/viewtopic.php?p=563023#p563023.
; Requirements:
; - AutoHotkey needs to be installed in C:\Program Files (or use the workaround from https://www.reddit.com/r/AutoHotkey/comments/16ux144/ui_access_without_reinstalling_in_program_files_v2/).
; - In the 'Launch Settings' of 'AutoHotkey Dash' you need to enable 'UI Access'.
@charlie89
charlie89 / fritzbox_reboot.py
Created July 24, 2021 18:11
FRITZ!Box Reboot (works on FRITZ!OS 7.24 and above)
#!/usr/bin/env python3
# vim: expandtab sw=4 ts=4
"""
FRITZ!OS WebGUI Login
Get a sid (session ID) via PBKDF2 based challenge response algorithm.
Fallback to MD5 if FRITZ!OS has no PBKDF2 support.
AVM 2020-09-25
Code from https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AVM_Technical_Note_-_Session_ID_deutsch_2021-05-03.pdf
added a function to reboot the router