Skip to content

Instantly share code, notes, and snippets.

@joric
joric / telegram_win11_caption_patch.py
Last active September 11, 2024 11:09
A binary patch to fix Telegram caption color in Windows 11
# Issue: https://github.com/telegramdesktop/tdesktop/issues/26369
# how to find signature:
# 1. open Telegram.exe in idaq64.exe
# 2. press g, look for DwmSetWindowAttribute (see https://github.com/desktop-app/lib_ui/blob/master/ui/platform/win/ui_window_win.cpp)
# 3. when it loads, context menu on DwmSetWindowAttribute, show references
# 4. try a few, in my case it was 6-th from the top
# 5. switch to hex, copy hex, switch back to disassembly, use arrows < > to navigate history, repeat
# result signatures, find and replace first byte to c3 (ret)
# 48896C2420564883EC50488B05 (aug 2023)
@joric
joric / chatgpt-topre.md
Last active September 10, 2024 14:40
chatgpt-topre.md

shortly about technical implementation of hhkb pro 2

The Happy Hacking Keyboard Professional 2 (HHKB Pro 2) is a mechanical keyboard that is designed to provide a high-quality typing experience. It is a compact keyboard that features a minimalist layout with a small form factor, which makes it easy to carry around and use in different locations.

The keyboard uses Topre switches, which are a type of electro-capacitive switch that provides a tactile and responsive typing experience. The switches have a unique feel and are known for being both durable and quiet.

The HHKB Pro 2 also features a range of customizable features, such as key remapping, programmable macros, and a dip switch that can be used to change the keyboard layout. These features make the keyboard highly adaptable to different typing styles and preferences.

In terms of connectivity, the HHKB Pro 2 can be connected to a computer using a USB cable or a Bluetooth connection. This provides flexibility in how the keyboard is used and makes it co