Skip to content

Instantly share code, notes, and snippets.

version: "2.0"
services:
nut-upsd:
image: instantlinux/nut-upsd
ports:
- 3493:3493
environment:
- SERIAL=abcdef123456
secrets:
@JoshStark
JoshStark / convert_audible.sh
Last active June 18, 2021 06:28
A script which combines audible-cli and update_chapter_titles.py to create a 1-1 m4b file from an aax file.
#!/bin/bash
# This script has a few pre-requisites:
#
# 1. The audible-cli must be installed and available in the $PATH.
# https://github.com/mkb79/audible-cli
# e.g. export PATH=$PATH:/home/$(whoami)/.local/bin
#
# 2. The update_chapter_titles.py must also be present in the same
# directory as this file. This also relies on python3 being in the $PATH
@rafaelbiriba
rafaelbiriba / tree-report.sh
Last active September 22, 2024 20:20
Generate tree report file on NAS and send it by email (optional)
#!/bin/bash
# Creates DISK0.tree, DISK1.tree, DISKx.tree inside each disk, with the output of tree command.
# After generating the report, it send via email using mail.
# To add more disks, just add DISK[x]=/full/path to the disk. Just make sure that the array index are sequencial.
# Why this?
# With the reports from tree, in case of disk failure, you will know which file got lost and you can recover them, downloading or via backups.
# GIST: https://gist.github.com/rafaelbiriba/0ee7ca2baec1ef80a878c825295f09e1
EMAIL_ADDRESS="" # EMAIL_ADDRESS="email@gmail.com" or leave it blank "" to disable email
DISKS[0]="/srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_ABC123-part1"