Skip to content

Instantly share code, notes, and snippets.

View Princesseuh's full-sized avatar
💐
Probably wishing I was making bouquets instead

Erika Princesseuh

💐
Probably wishing I was making bouquets instead
View GitHub Profile
#![deny(clippy::unwrap_used)]
fn main() {
Err::<(), _>("foo").or_panic()
}
trait UnwrapPanic<T> {
fn or_panic(self) -> T;
}
@rendello
rendello / _utf8_case_data.rs
Last active December 25, 2025 23:54
Unicode codepoints that expand or contract when case is changed in UTF-8. Good for testing parsers. Includes the data `utf8_case_data.rs` and the script to generate it, `generate_utf8.py`.
/*
Copyright (c) 2024 Rendello
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
@lainosantos
lainosantos / dell_u2723qe.sh
Last active January 18, 2026 13:23
Basic commands for for KVM, PIP and PBP features for Dell Monitor U2723QE on Linux ddcutil
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ] && groups | grep -qwv 'i2c' && getent group i2c &> /dev/null
then
echo "Insuficient permissions, run as root ou join $USER to i2c group."
exit 1
fi
case "$1" in
-- BASIC EASING FUNCIONS CHEAT CHEET
-- (most of them are based on glide by Jacob Albano https://github.com/jacobalbano/glide)
function ease_linear(t)
return t
end
function ease_cube_in(t)
return t * t * t
end
@IceDragon200
IceDragon200 / flags_table.txt
Last active April 7, 2018 02:22
RMVXA Tileset Flags
# ----------------------------------------------------------------------------------------------------------------------------- #
# | nibble / half byte | 0 - passable | 0 - disabled | 0 - passable |
# | | 1 - impassable | 1 - enabled | 1 - impassable |
# ----------------------------------------------------------------------------------------------------------------------------- #
# | Terrain Tag (4bits) | Vehicle Pass. (3bits) | Special Flags (4bits) | Passages (5bits) |
# ----------------------------------------------------------------------------------------------------------------------------- #
# | | Airship | Ship | Boat | Damage Floor | Counter | Bush | Ladder | Star | Top | Right | Left | Bottom |
# ------------------------------------------------------------------------------------------------------------------------
@willurd
willurd / web-servers.md
Last active January 21, 2026 15:38
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000