Skip to content

Instantly share code, notes, and snippets.

@jmswrnr
jmswrnr / ESP32_ROM_LABELS.txt
Created January 27, 2024 13:41
Ghidra ESP32 ROM function labels
sp_rom_md5_init 0x4005da7c l
sp_rom_md5_update 0x4005da9c l
sp_rom_md5_final 0x4005db1c l
ts_secure_boot_verify_signature 0x4006543c l
ts_secure_boot_verify_boot_bootloader 0x400655ec l
ts_use_secure_boot_v2 0x4000f8d4 l
ts_rsa_pss_verify 0x40065310 l
ts_mgf1_sha256 0x400651a8 l
ts_emsa_pss_verify 0x4006520c l
Add2SelfBigHex256 0x40015b7c l
@mattstobbs
mattstobbs / month-picker.tsx
Created July 26, 2023 22:15
A simple month picker that matches the style of shadcn/ui
import {
add,
eachMonthOfInterval,
endOfYear,
format,
isEqual,
isFuture,
parse,
startOfMonth,
startOfToday,
@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@oNguyenNgocTrung
oNguyenNgocTrung / postgres_command.md
Last active May 19, 2024 09:53
Tổng hợp những câu lệnh khi dùng Postgres SQL
@vishal2376
vishal2376 / Place.kt
Last active May 19, 2024 09:53
Image Reflection with cool animation using Jetpack Compose
data class Place(
val name: String,
val resId: Int
)
@metajiji
metajiji / install-megacli.md
Last active May 19, 2024 09:47 — forked from fxkraus/debian-install-megacli.md
Install LSI MegaCli

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

or

curl -LO https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
@rebane2001
rebane2001 / plot_discord_predictions.py
Last active May 19, 2024 09:46
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
"""
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
To use, simply put this script in your activity/analytics/ folder of your Discord data dump and run it.
You may need to install matplotlib first:
pip install -U matplotlib
thrown together by rebane2001
@Pulimet
Pulimet / AdbCommands
Last active May 19, 2024 09:46
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@GrabbenD
GrabbenD / README.md
Last active May 19, 2024 09:45
[Sway] Use VRR in fullscreen only

VRR for fullscreen apps only

The idea behind this script is to only use VRR when a application is in fullscreen mode, here's the features:

  • Has multi monitor support through a output whitelist config (I'd like this to be automatic in the future but there doesn't seem to be any way in swaymsg to identify if a output is VRR capable, one thing which comes to mind is checking EDID for VRR range).
  • Determine if VRR needs to be toggled when a application is in fullscreen mode (which is how Windows does it usually and it's a option in Hyprland). This applies to:
    • Opening a app
    • Changing focus
    • Switching workplaces
    • Going into fullscreen mode (e.g. Youtube videos in Chromium)
#!/usr/bin/env zsh
chromium_version="52.0.2743.98"
clean=0
supported_arch=(arm arm64 x86 x64)
usage() {
echo "Usage:"
echo " build_webview [ options ]"
echo