Skip to content

Instantly share code, notes, and snippets.

@nopbxlr
nopbxlr / migrate_auth.py
Created November 5, 2025 22:43
A simple, lazy EasyAuth (Fabric) to AuthMe (Bukkit) SQLite DB converter
"""
A low effort script to migrate EasyAuth (Fabric) data to AuthMe (Bukkit) format.
Useful if you want to switch server types without forcing all your users to re-register, and maintain their last known positions.
Requires nbtlib: pip install nbtlib
Feed it the server path as the first argument. It'll look for EasyAuth data there and create authme.db in the script's directory.
Check the data! This is a fragile script lacking a lot of checks. I am not responsible for any data loss. Use a staging env.
This only works if EasyAuth data was using bcrypt hashes. It may be possible with a bit more effort to support Argon2 hashes too.
Don't forget to set up AuthMe with bcrypt support.
"""
@nopbxlr
nopbxlr / Ninebot_BMS_Emulator.ino
Last active January 30, 2025 16:38
Ninebot_BMS_Emulator (STILL WIP)
#define BAUDRATE 115200
#define PRE_MSB 0x5A
#define PRE_LSB 0xA5
#define CMD_READ 0x01
#define CMD_WRITE 0x02
#define CMD_REPLY 0x04
#define CMD_WR_REPLY 0x05
#define c_MIN_BATT_V 3500
#define c_MAX_BATT_V 4200
#define c_BATT_CAP 15300
@nopbxlr
nopbxlr / okai_electisan_hack.ino
Created January 6, 2020 16:00
okai_electisan_hack
unsigned short tcrc[]={
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5,
0x60C6, 0x70E7, 0x8108, 0x9129, 0xA14A, 0xB16B,
0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x1231, 0x0210,
0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C,
0xF3FF, 0xE3DE, 0x2462, 0x3443, 0x0420, 0x1401,
0x64E6, 0x74C7, 0x44A4, 0x5485, 0xA56A, 0xB54B,
0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6,