Skip to content

Instantly share code, notes, and snippets.

View arimelody's full-sized avatar
🤠
CRUDing my apps

ari melody arimelody

🤠
CRUDing my apps
View GitHub Profile
@arimelody
arimelody / pterodactyl-backup-downloader.sh
Last active April 11, 2025 12:25
Downloads server backups from Pterodactyl panel
#!/bin/bash
# Pterodactyl backup downloader script
# made with <3 by ari melody
#
# Usage: ./pterodactyl-backup-downloader.sh <server_uuid> <backup_uuid> [-y]
# `-y` will force the script to download without a prompt (useful for backup automation!)
#
# this script requires a `.env` file containing the following variables:
# BASE_API_URL="https://pterodactyl.example.host/api"
@arimelody
arimelody / bluesky-pds-backup.sh
Created March 11, 2025 22:09
Backs up a Bluesky PDS running on the local system. Assumes the default `/pds` directory is used, and stores backups in `./backups/bluesky-pds/`.
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root! Not all directories may be properly backed up otherwise."
exit 1
fi
BASE_DIR="/pds"
BACKUP_DIR="./backups/bluesky-pds"
BACKUP_NAME="bluesky-pds_backup-$(date '+%Y-%m-%d')"
@arimelody
arimelody / malloc-over.c
Created February 13, 2025 19:16
Allocates a single byte, and attempts read/writes `bytes` ahead, starting from that memory pointer.
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
if (argc != 2) {
printf(
"Usage: %s <bytes>\n"
"Allocates a single byte, and attempts read/writes `bytes` ahead, starting from that memory pointer.\n",
argv[0]);
@arimelody
arimelody / makeMagicList.js
Created August 31, 2024 14:32
Creates a reorderable list from any `container` and viable list item selector.
/**
* Creates a reorderable list from any `container` and viable list item selector.
*
* This function is absolute magic and I love it
*
* Example:
* ```html
* <ul id="list">
* <li>Item 1</li>
* <li>Item 2</li>