Skip to content

Instantly share code, notes, and snippets.

View bonelifer's full-sized avatar

William Jacoby bonelifer

View GitHub Profile
@bonelifer
bonelifer / rsync-homedir-excludes.txt
Created October 2, 2025 19:45 — forked from HappyCodingRobot/rsync-homedir-excludes.txt
Filey to exclude when creating a backup of the home directory using rsync
# rsync-homedir-excludes
#
# A list of files to exclude when backing up *nix home directories using rsync.
#
# Author: Ruben Barkow-Kuder <https://github.com/rubo77/rsync-homedir-excludes>
# Version: 2019-11-30
#
# #Usage:
# USER=<homedir username here>
# rsync -aP --exclude-from=rsync-homedir-excludes.txt /home/$USER/ /media/$USER/linuxbackup/home/$USER/
@bonelifer
bonelifer / send_to_kodi.py
Created October 2, 2025 19:41 — forked from Gregwar/send_to_kodi.py
Play URL to Kodi
# Can be use to send an url (e.g: http://.../movie.mp4) to your Kodi media center
# You have to enable HTTP control (without password)
# This can be used on an Android Phone with pyDroid (don't forget to pip install requests)
import requests
# Kodi IP address
kodi = "192.168.1.34"
url = input("Enter URL: ")
@bonelifer
bonelifer / video_db_cleanup.py
Created October 2, 2025 19:40 — forked from allixx/video_db_cleanup.py
Kodi MyVideos sqlite db cleanup script
#!/usr/bin/env python
"""
A simple script to clean kodi's MyVideos sqlite db from obsolete junk.
It will remove all references to non-existing video files and paths.
Records referencing plugins (i.e. YouTube) are ignored.
Bookmarks, settings and streamdetails tables are touched as well, just in case.
@bonelifer
bonelifer / add_artist_list.sh
Created July 19, 2025 23:07 — forked from jackskhakis/add_artist_list.sh
Script to add list of artists (in a text file) to lidarr, this method bypasses the difficulties that are currently present in lidarr with relation to searching and adding new artists
#!/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
@bonelifer
bonelifer / add_artists.sh
Created July 19, 2025 23:07 — forked from jackskhakis/add_artists.sh
Script to add list of artists (in a folder) to lidarr, this method bypasses the difficulties that are currently present in lidarr with relation to searching and adding new artists
#!/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
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
@bonelifer
bonelifer / install-gh-cli.sh
Created July 19, 2025 21:51 — forked from mikestankavich/install-gh-cli.sh
Convenience script to install GitHub CLI on Ubuntu
#!/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
@bonelifer
bonelifer / system-info.sh
Created July 19, 2025 21:37 — forked from Its4Nik/system-info.sh
This is a simple bash script that will gather system boot info and general hardware info. (Only tested on Arch!)
#!/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'
@bonelifer
bonelifer / dashy_to_homepage.py
Last active April 2, 2025 01:51 — forked from Nixellion/dashy_to_homepage.py
Script to migrate from Dashy (https://dashy.to/) to Homepage (https://gethomepage.dev/)
"""
Script to migrate from Dashy (https://dashy.to/) to Homepage (https://gethomepage.dev/)
Get your config.yml from Dashy and place it in the same folder as this script.
Run the script with Python.
The script takes a list of known services that have Widgets in Dashy and tries to automatically match your existing entries to this list, to decide whether an entry should be a bookmark or a service entry.
Adjust MATCH_THRESHOLD as needed depending on how much your titles match service names.
"""
#!/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}'