Skip to content

Instantly share code, notes, and snippets.

View Qu1ck5h0t's full-sized avatar
⚔️
Locked in 🗿

Qu1ck5h0t

⚔️
Locked in 🗿
View GitHub Profile
@Qu1ck5h0t
Qu1ck5h0t / XOR_2_images_fixed.py
Last active January 30, 2025 04:05 — forked from lotusirous/XOR_2_images.py
Xor 2 images with python (FIXED)
import cv2
foo = cv2.imread("./foo.png")
bar = cv2.imread("./bar.png")
key = cv2.bitwise_xor(foo, bar)
cv2.imshow("xored data", key)
cv2.waitKey(0)
@Qu1ck5h0t
Qu1ck5h0t / bashrc_QoL_additions.sh
Last active April 22, 2025 06:00
Some code I append to my .bashrc for quality of life improvements.
# Allows the user to run .py, .sh and .c implicitly through filename extensions rather than delcaring it in a command.
# Note that tempc needs to be installed to run c files. Get it here! -> https://github.com/Qu1ck5h0t/tempc
command_not_found_handle() {
if [[ "$1" == *.py ]]; then
python3 "$1"
elif [[ "$1" == *.sh ]]; then
chmod +x "$1"
./"$1"
elif [[ "$1" == *.c ]]; then
tempc "$1"