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
@petersalomonsen
petersalomonsen / song.js
Created May 21, 2022 06:17
WebAssembly Music - Veronika's Waltz
/*
* Copyright (c) 2022 - Peter Johan Salomonsen
*/
setBPM(50);
addInstrument('piano');
addInstrument('string');
addInstrument('drums');
addInstrument('guitar');
@itod
itod / split_keyboards.md
Last active April 26, 2025 15:22
Every "split" mechanical keyboard currently being sold that I know of
@justinfx
justinfx / cix_to_py.py
Created June 1, 2014 05:39
A small script to convert a .cix (codeintel schema) file into a python stub module, for use in auto-completion
#!/usr/bin/env python
'''
A small script to convert a .cix (codeintel schema) file into
a python stub module, for use in auto-completion.
https://community.activestate.com/faq/codeintel-cix-schema
Requires jinja2 for the output template format
'''