Skip to content

Instantly share code, notes, and snippets.

View Kalbra's full-sized avatar
🧹

Kalle Bracht Kalbra

🧹
  • Kassel Germany
  • 06:40 (UTC +02:00)
View GitHub Profile
@Kalbra
Kalbra / CSS colors as hex.h
Created January 19, 2021 12:18
All CSS colors in a C header for general color usage
#define CSS_COLOR_AliceBlue 0xF0F8FF
#define CSS_COLOR_AntiqueWhite 0xFAEBD7
#define CSS_COLOR_Aqua 0x00FFFF
#define CSS_COLOR_Aquamarine 0x7FFFD4
#define CSS_COLOR_Azure 0xF0FFFF
#define CSS_COLOR_Beige 0xF5F5DC
#define CSS_COLOR_Bisque 0xFFE4C4
#define CSS_COLOR_Black 0x000000
#define CSS_COLOR_BlanchedAlmond 0xFFEBCD
#define CSS_COLOR_Blue 0x0000FF
@Kalbra
Kalbra / database.py
Created January 1, 2021 17:25
Class to easierly manage mysql
import mysql.connector
# Sets env variables
HOST = "localhost"
USER = "user"
PASSWORD = "password"
# This class is for easier sql querying
class Database:
conn = None
@Kalbra
Kalbra / converter.py
Created November 22, 2020 18:51
Converts little endian hexadezimal into big endian and the other way round
hex_reverse = ""
for h in [hex[i:i + 2] for i in range(0, len(hex), 2)][::-1]:
hex_reverse += h