Skip to content

Instantly share code, notes, and snippets.

@juliavdkris
juliavdkris / config.fish
Last active November 28, 2024 16:54
Fish config (aliases n some other shit)
# Text editor
abbr -a -g m micro
alias hex='hx'
abbr -a -g hx helix
abbr -a -g v nvim
export EDITOR=helix
export BROWSER=firefox
export NNN_PLUG='z:autojump;f:finder;o:fzopen;d:diffs'
@juliavdkris
juliavdkris / oddify.s
Last active August 31, 2020 22:33
CO lab course oddify source code
# Assemble with:
# gcc -no-pie -g -o oddifier oddifier.s
# From: CSE1400 Lab Course Manual
# Delft University of Technology
.text
welcome: .asciz "\nWelcome to our program!\n"
prompt: .asciz "\nPlease enter a positive number:\n"
input: .asciz "%ld"
@juliavdkris
juliavdkris / Podcast_sleep_mode.category
Created October 18, 2020 18:02
Podcast sleep mode
[
{
"localVariables": [],
"m_GUID": -8488175240376223000,
"m_actionList": [
{
"m_delayInMilliSeconds": 0,
"m_delayInSeconds": 5,
"m_useAlarm": false,
"m_SIGUID": -6807105463704047000,
-- Extended Full Added
LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
ENTITY Ex_fadder IS
PORT (
a, b, sel, ci : IN STD_LOGIC;
sum, co : OUT STD_LOGIC);
END Ex_fadder;
@juliavdkris
juliavdkris / filter.sh
Created December 23, 2021 11:13
Filter wallpapers by resolution
#!/bin/bash
MIN_WIDTH=2560
MIN_HEIGHT=1440
mkdir {lowres,highres}
identify -format "%f, %w, %h\n" *.{png,jpg,jpeg,jfif,webp} 2>/dev/null |
awk -F ',' "\$2 >= $MIN_WIDTH && \$3 >= $MIN_HEIGHT {print \$1}" |
xargs -I % echo "echo '%' && mv '%' highres/" | sh
@juliavdkris
juliavdkris / assemble.sh
Last active March 23, 2022 01:25
Assemble shellcode
#!/bin/bash
if [[ $# -lt 1 ]]; then
echo "Please pass a file to assemble!"
exit
fi
tmpfile=$(mktemp --suffix ".o")
yasm -f elf64 $1 -o $tmpfile
@juliavdkris
juliavdkris / ssh_pubkeys
Last active August 17, 2023 16:31
SSH public keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJwb4JGEp3fEDrJgQBTg7CfrXGJ4BkVwm1GwpvxsuVYU julia@aperture
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHjarJZTlJL5g7cShF4MzDEroIX3fG6LO7jV9vbJQ0ZA julia@raamwerk
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYhlAgZFmBdEKVPTLQgMol32MQKoykulApqs19lKBRF julia@ThiccPad
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJFZhaDPgMOTcX52dSDc1pLOVC/v/HHkfrCXQutMx43m jvanderkris@linux-bastion-ex
[user]
name = Julia van der Kris
email = julia@juuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuulia.dev
signingKey = E1E5C5047E630395FA7CD77C1510909663FDF2C0
[commit]
gpgsign = true
[pull]
rebase = true
[core]
pager = delta
@juliavdkris
juliavdkris / backup.sh
Created December 21, 2022 12:29
Cyclic backup script
#!/bin/bash
DIR=/srv/backups/prime-server/recent
PRESERVE_COUNT=30
# Delete all but the 30 latest backups
find $DIR -type f -printf '%T+\t%p\n' | sort | cut -f2 | head -n -$PRESERVE_COUNT | xargs -r rm -v
# Create a new backup
mysqldump primeserver > "$DIR/`date +\%d-\%m-\%Y`-primeserver.sql"