- Do
sudo su
- Copy-paste the script (it will reboot the machine)
NOTE: I am using with with Vagrat's shell provisioner as it is easier (with privileged execution).
#!/bin/bash | |
set -euo pipefail | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
YELLOW='\033[1;33m' | |
BLUE='\033[0;34m' | |
BOLD='\033[1m' | |
NC='\033[0m' |
#!/bin/bash | |
set -e | |
############################################################################################### | |
# This is a convenience script for installing the Github gh CLI. Invoke as follows: # | |
# curl -fsSL https://gist.github.com/yourusername/gist-hash/raw/install-gh-cli.sh | sudo bash # | |
# Author: Mike Stankavich https://github.com/mikestankavich [email protected] # | |
############################################################################################### | |
# Root check |
sudo apt -y update | |
sudo apt -y install ca-certificates gnupg | |
sudo install -m 0755 -d /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
echo \ | |
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ | |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
#!/bin/bash | |
# Path to the text file with artist names (one per line) | |
artist_list_file="./artist_list.txt" | |
# Where Lidarr should create new artist folders | |
# This must match a configured Root Folder in Lidarr | |
lidarr_root="/music/" | |
# Lidarr API details |
#!/bin/bash | |
# Folder where existing artist folders are located (source) | |
source_dir="/mnt/media/music/old" | |
# The Lidarr root folder path to add new artists under | |
# This must match a configured Root Folder in Lidarr settings | |
lidarr_root="/music/new" | |
# Lidarr API access |
#!/usr/bin/env bash | |
lidarrUrl="" | |
lidarrApiKey="" | |
curl -s "$lidarrUrl/api/v1/album/monitor" --request PUT --header "X-Api-Key:"${lidarrApiKey} -H "Content-Type: application/json" --data-raw '{"albumIds":['$lidarr_album_id'], "monitored": false}' |
#!/bin/bash | |
set -eo pipefail | |
# NOTES: | |
# to use on backup files created by Google Takeout: https://support.google.com/accounts/answer/3024190?hl=en | |
# creates lists of top N mail senders & distribution-lists @ /tmp | |
# can be used to create Google Vault retentions to clean-up old mails or spam: https://support.google.com/vault/answer/2990828?hl=en | |
if [-z "$1" ] |
import requests | |
import os | |
import argparse | |
from collections import defaultdict | |
# I have photos in subfolders like : | |
# /mnt/media/Photos/2023-08 Holidays | |
# /mnt/media/Photos/2023-06 Birthday | |
# /mnt/media/Photos/2022-12 Christmas |