Skip to content

Instantly share code, notes, and snippets.

View jeffangelion's full-sized avatar
💩
writing shell scripts

Ivan Vatlin jeffangelion

💩
writing shell scripts
View GitHub Profile
@jeffangelion
jeffangelion / tg_color_picker.v
Created January 6, 2024 21:24
Get empty userpic color by Telegram ID as an official client
// https://github.com/telegramdesktop/tdesktop/blob/2ef8136308e31e07988ee4654b73ae2a5ab495dc/Telegram/SourceFiles/ui/empty_userpic.cpp#L257
// https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/ui/chat/chat_style.cpp#L1033
struct Color {
red u8
green u8
blue u8
}
fn (c Color) str() string {
@jeffangelion
jeffangelion / intel_x520_patcher.py
Created November 7, 2024 10:47 — forked from ixs/intel_x520_patcher.py
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020,2021,2022 Andreas Thienemann <[email protected]>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/
#!/usr/bin/env bash
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2024 Ivan Vatlin <[email protected]>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/