Skip to content

Instantly share code, notes, and snippets.

@robertsez
robertsez / README.md
Last active September 3, 2024 09:30
A simple frontend for Hamster Kombat promo key generator

Hamster Kombat key generator frontend 🐹

This HTML file serves as a simple, silly frontend for delasy's key generator gist.
Originally, the previously mentioned gist was a direct dependency on this gist, but after the owner made some breaking changes that made my monkey patching very difficult, I decided that it was easier to just maintain a dedicated fork (I've copied his code inside this gist directly).

Why did I create this?

@robertsez
robertsez / unicode_replace.py
Last active January 23, 2022 22:30
Replace 16bit hex Unicode characters with named Unicode in Python scripts
# Example file content before: print("\u274c")
# After: print("\N{CROSS MARK}")
import re
REGEXP = re.compile(r"(\\u[0-9|a-f|A-F]{4})+")
with open("file.py", "r", encoding="utf-8") as file:
lines = file.readlines()