Skip to content

Instantly share code, notes, and snippets.

@maxkagamine
maxkagamine / backup_flash_and_appdata.sh
Last active June 28, 2023 01:34
Unraid user script to create backups of the flash drive and appdata on a schedule. An email is sent with the full command output if the cronjob fails.
#!/bin/bash
#name=Backup flash and appdata
#description=Creates tarballs of the flash drive and appdata share.
#argumentDescription=Backup directory
#argumentDefault=/mnt/user/Backup/Sovngarde
#arrayStarted=true
#noParity=true
#clearLog=true
set -eo pipefail
shopt -s extglob
@maxkagamine
maxkagamine / Nginx & certbot on Unraid.md
Last active June 30, 2024 19:00
Guide to running an nginx reverse proxy on Unraid with a Let's Encrypt wildcard cert, using the official nginx and certbot Docker images.

Nginx & certbot on Unraid

Here's a guide to running an nginx reverse proxy on Unraid with a Let's Encrypt wildcard cert (which can cover the Unraid web gui too), using the official nginx and certbot Docker images.

Other options:

  • caddy — popular nginx alternative with built-in automatic Let's Encrypt
  • pomerium — all-in-one reverse proxy, SSL, and OAuth-based login (compare to Caddy Security)
  • nginx-certbot — parses your nginx configs and manages certbot for you (see the original version of this gist for a script to copy your cert to Unraid)
  • swag — used to be called letsencrypt; has other things in it like PHP & f

How to install GNU Stow on Unraid

Unraid OS ≥6.11.0

  1. Install the User Scripts (Andrew Zawadzki) plugin from CA
  2. cat /etc/slackware-version and check which Slackware version the current Unraid OS is based on
    • 6.11.0 ⇒ Slackware 15
  3. Head to packages.slackware.com, filter Release to Slackware64 + that version, and search for the following packages:
    • gc
  • guile
@maxkagamine
maxkagamine / batch_rename_mmd_models.py
Last active March 23, 2022 07:32
Blender addon to rename selected MMD models' armature, mesh, and materials to match the name of the empty. https://twitter.com/maxkagamine/status/1380531111906869248
# MIT License
#
# Copyright (c) 2021 Max Kagamine
#
# 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, subject to the following conditions: