Skip to content

Instantly share code, notes, and snippets.

@joric
joric / telegram_win11_caption_patch.py
Last active November 5, 2024 17:58
A binary patch to fix Telegram caption color in Windows 11
'''
link to latest gist: https://gist.github.com/joric/61a8eb1501f36c8e57408a035cf5a8b0
link to 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, list cross references to
4. try a few, in my case it was 6-th from the top, click on it to go to disassembly
5. find start of the subroutine, switch to Hex View-1 tab, copy hex, switch back to disassembly, use toolbar < > to navigate history, repeat
@joric
joric / LongLoadingTimesFix.ini
Created September 1, 2024 17:47
LongLoadingTimesFix.ini
## To enable the setting, set the value after the "=" sign to "true", to disable - "false" or "0".
[Fixes]
## Fixes long loading times with black loading screens and when moving between locations using the elevator.
#
bLoadingFix = true
## Speed up the loading of recently visited locations.
#
bQuickLoad = true
@joric
joric / HighFPSPhysicsFix.ini
Created September 1, 2024 01:00
HighFPSPhysicsFix.ini
##To enable setting set value after the "=" to true, to disable - to false or 0.
[Main]
## Untie the game speed from the framerate.
#
UntieSpeedFromFPS=true
## Enable to disable the iFPSClamp game option, which will otherwise interfere with the mod.
#
DisableiFPSClamp=true
@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