Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bonelifer's full-sized avatar

William Jacoby bonelifer

View GitHub Profile
@bonelifer
bonelifer / drive-backup.py
Last active April 23, 2024 08:05
Collection of Python scripts to backup Google Drive files. Created using chatGPT.
#!/usr/bin/env python3
"""
Script: drive-backup.py
Description: Downloads the entire contents of a Google Drive using Google Drive API.
Requirements:
- Google Client Library: `pip install google-api-python-client`
- Create a project in Google Cloud Console, enable Drive API, and generate credentials (OAuth 2.0 Client IDs).
- Save the credentials JSON file as 'credentials.json' in the same directory as this script.
Usage:
@bonelifer
bonelifer / monitor_albums.sh
Created April 22, 2024 06:00 — forked from jordandrako/monitor_albums.sh
[Un]monitor Albums in Lidarr
#!/bin/bash
helpText="
# Usage:\n
#\n
# ./monitor_albums.sh -k 'apiKey' -b 'http://host:port' -t [Single|EP|Album] [-m|u|A|h][-n 'artist name'][-i artistId]\n
#\n
# Required Options:\n
# -k Your Lidarr API Key (defaults to \$apiKey env variable)\n
# -b Your Lidarr instance URL (defaults to \$baseUrl env variable)\n
#!/usr/bin/env bash
################ Description: ###################
# This script disables telemetry opt-out under
# Ubuntu 22.04 (Codename: Jammy Jellyfish).
# It resolves telemetry domains to 0.0.0.0 and removes
# telemetry services system-wide.
################ Parameter: #####################
# None

Automatic Sync Using udev

Phone Udev Rule Setup

Overview

This guide explains how to set up udev rules to automatically mount your phone at /mnt/phone and synchronize music files from a local directory to the phone when it's connected to your computer.

Installation

@bonelifer
bonelifer / commit.sh
Last active April 17, 2024 20:48 — forked from theHilikus/commit-alias.sh
alias to create empty commits
#!/bin/bash
# Function: commit
# Description: Commits changes to the current branch with an empty commit message containing the branch name.
commit() {
# Check if the current directory is within a Git repository
if ! git rev-parse --is-inside-work-tree &>/dev/null; then
echo "Error: Not in a Git repository. Please navigate to a Git repository directory."
return 1
#!/usr/bin/env python3
"""
$ pip install piper-tts loguru typed-argparse bs4 ebooklib mutagen
$ apt install ffmpeg
Assuming both piper and ffmpeg are in your path, this script will convert an epub file to an audiobook.
"""
import math
import os
import queue
@bonelifer
bonelifer / compile-mpd.sh
Created April 1, 2024 16:13
compile-mpd.sh
#!/bin/bash
#===============================================================================
#
# FILE: install_mpd.sh
# USAGE: ./install_mpd.sh
# DESCRIPTION: This script installs MPD (Music Player Daemon) and its
# dependencies. It detects the distribution (Debian or Ubuntu)
# and installs the appropriate packages accordingly.
#
# OPTIONS: None
@bonelifer
bonelifer / lircd.conf
Created March 26, 2024 16:42 — forked from lexrms/lircd.conf
Lirc configuration for HP MODEL OVU422000/06 HP P/N 5070-2584 HK 03 50703 G 017733
#Configuration for the Windows Media Center Transceivers/Remotes (all) remote: MCEUSB
#HP MODEL OVU422000/06 HP P/N 5070-2584
#HK 03 50703 G 017733
include "/usr/share/lirc/remotes/mceusb/lircd.conf.mceusb"
begin remote
name lircd.conf
bits 8
@bonelifer
bonelifer / pianobar-compile.sh
Last active March 22, 2024 07:08
Compile pianobar on Ubuntu 22.04
#!/bin/bash
# Compile and install pianobar on Ubuntu
# Install needed apps and libraries
sudo apt install git libgcrypt20-dev make libasound2-dev curl libjson-c-dev
# Git Clone pianobar repo
git clone https://github.com/PromyLOPh/pianobar.git
cd pianobar
@bonelifer
bonelifer / pianobar-compile.sh
Created March 22, 2024 07:06
Compile and install pianobar on Debian
#!/bin/bash
# Compile and install pianobar on Debian
# Install needed apps and libraries
sudo apt install libgcrypt20-dev make libasound2-dev curl libjson-c6-dev git
# Git Clone pianobar repo
git clone https://github.com/PromyLOPh/pianobar.git
cd pianobar