Skip to content

Instantly share code, notes, and snippets.

View mothdotmonster's full-sized avatar
🏳️‍🌈
i'm gay

Chesapeake mothdotmonster

🏳️‍🌈
i'm gay
View GitHub Profile
@mothdotmonster
mothdotmonster / wtfgfy.txt
Last active October 10, 2023 14:20
WTF+GFY Public License
Copyright <YEAR> <COPYRIGHT HOLDER>
0. Just DO WHAT THE FUCK YOU WANT TO.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so.
@mothdotmonster
mothdotmonster / prime-zipper.py
Created June 7, 2023 04:30
turn a zip file into a prime number
import sympy as sp
fileName = "file.zip"
with open(fileName, mode="rb") as file:
fileContents = bytearray(file.read())
fileContents.append(255)
while not sp.isprime(int.from_bytes(fileContents)):
if (int.from_bytes(fileContents[-1:]) != 0):
print("bruteforcing " + str(int.from_bytes(fileContents[-1:])))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mothdotmonster
mothdotmonster / jwst-sparkle-emoji-small.svg
Created January 18, 2023 19:37
Diffraction inspired sparkle emoji
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mothdotmonster
mothdotmonster / jwst-sparkle.svg
Created January 18, 2023 19:26
JWST diffraction inspired "sparkle" icon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mothdotmonster
mothdotmonster / clarus.svg
Created January 8, 2023 04:19
Clarus the dogcow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mothdotmonster
mothdotmonster / bash-oneliners.md
Last active August 29, 2023 21:42
bash oneliners that are funny or useful

Bash Oneliners

This is a list of my favorite bash oneliners.

GASTER MODE

sudo fc-list --format=%"{file}\n" | xargs -d '\n' sudo rm && sudo wget -P /usr/share/fonts https://archive.org/download/windows-fonts_202006/W/WINGDING.TTF && sudo fc-cache -f && sudo reboot

sudo $(fc-list --format=%"{file}\n" | xargs -d '\n' rm && wget -P /usr/share/fonts https://archive.org/download/windows-fonts_202006/W/WINGDING.TTF && fc-cache -f && reboot)

WHITE NOISE TO HELP YOU SLEEP

cat /dev/urandom | aplay

@mothdotmonster
mothdotmonster / bubbleoptimized.svg
Created November 10, 2022 09:16
bubble timeline icon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mothdotmonster
mothdotmonster / spinny.sh
Created October 30, 2022 23:25
spin your monitor around, slowly but surely
#!/bin/bash
# make sure we're not on Wayland, because xrandr doesn't work on Wayland
if [ "$(loginctl show-session $(loginctl user-status $USER | grep -E -m 1 'session-[0-9]+\.scope' | sed -E 's/^.*?session-([0-9]+)\.scope.*$/\1/') -p Type | grep -ic "wayland")" -ge 1 ]; then # stolen from stackoverflow
echo "You aren't using X!"
exit
fi
# no more annoying cursor
tput civis
@mothdotmonster
mothdotmonster / fuzzysleep.py
Created August 4, 2022 21:21
sleep with random delay, so you don't overload the server at midnight
#!/usr/bin/env python
# fuzzysleep - sleep with random delay, so you don't overload the server at midnight
import time, random, argparse
parser = argparse.ArgumentParser()
parser.add_argument("delay", help="Desired maximum delay", type=int)
parser.add_argument("--verbose", help="Prints extra info", action="store_true")
group = parser.add_mutually_exclusive_group()