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)
@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 June 12, 2024 12:08
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
'''