Skip to content

Instantly share code, notes, and snippets.

@kaubu
kaubu / toggle_scroll_lock_linux.sh
Created June 24, 2024 03:44
Toggle keyboard leds on Arch and Arch derivatives that require pressing the scroll lock button
# Get list of devices
ls /sys/class/leds/
# Find all that have "inputX::scrolllock" where X is an integer, and try the following command with all of them
# The one that worked for me was 6
# Toggle keyboard scroll lock leds on
sudo sh -c 'echo 1 > /sys/class/leds/input6::scrolllock/brightness'
# Toggle keyboard scroll lock leds off
@kaubu
kaubu / foreign.txt
Last active December 25, 2023 13:30
Misc Foreign Highlight
obscure origin
unknown origin
uncertain origin
unclear origin
unknown etymology
unknown etymologies
borrowed
Old Norse
Norse
Icelandic
@kaubu
kaubu / english.txt
Created December 25, 2023 00:07
English Highlight List
Old English
Proto-Germanic
Proto-West Germanic
@kaubu
kaubu / romance.txt
Last active December 25, 2023 04:07
French and Latin Highlight list
Anglo-French
Anglo-Latin
Anglo-Norman
Norman
French
Old French
Middle French
Latin
Medieval Latin
Vulgar Latin
@kaubu
kaubu / env.nu
Created November 18, 2023 02:02
Nu environment
# Enforce Git timezone is UTC
$env.TZ = "UTC"
# Set default editor of Nushell
$env.EDITOR = "vim"
@kaubu
kaubu / config.nu
Created November 18, 2023 02:00
NuShell config
# Aliases
alias ll = ls -l
alias la = ls -a
alias lla = ls -la
alias gs = git status
alias ga = git add .
alias gc = git commit
alias gcu = git commit -m 'Update'
alias gac = git add .; git commit
# 9(1)+4(2)+3(3)+2(4)+1(5)+1(6)+1(7)+1(8)+1(9)=
import math
slots: int = int(input("Slots: "))
spells = 0
for i in range(1, slots + 1):
# print(i)
new_spells = math.floor(slots / i)
@kaubu
kaubu / extract_dir.sh
Created September 27, 2023 17:16
Extract all zip files (made by 7zip) inside of a directory, in parallel
#!/bin/sh
ls *.zip | parallel -j+0 --eta '7z x {} >/dev/null'
@kaubu
kaubu / clean_cache.sh
Last active June 22, 2024 22:00
Cleans cache to get more story space on Arch-based Linux distributions
#!/bin/sh
# Remove old Haskell versions
ghcup gc --cache
# Clean pip cache
pip cache purge
# Remove packages cache
sudo pacman -Scc
yay -Scc
@kaubu
kaubu / vsb_characters.txt
Created August 16, 2023 13:37
VSBattles All Character Page Names for Special:Export
"Jerky" Johnson
"John Doe"
"Sweetie" Bitter Sweet
(´・ω・`)
10,000 Punch Man
1010
112 Ocean Avenue (The Amityville Horror)
170,000 Year Magicicada Nymph
1st Prize
2B (Soul Calibur)