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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
def send_html_mail(subject, body, to_addr, from_addr): | |
"""Send an HTML email using the given subject, body, etc.""" | |
# Create message container - the correct MIME type is multipart/alternative here! | |
message = MIMEMultipart('alternative') | |
message['subject'] = subject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#### pianobar fifo control script | |
PIPE=`cat ${HOME}/.config/pianobar/config | grep -v "#" | grep fifo | tr -d "\ " | cut -d"=" -f2` | |
if [[ ! -p ${PIPE} ]]; then | |
if [[ -z ${PIPE} ]]; then | |
printf "\npianobar fifo not specified in config.\nExiting...\n" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Small script that syncs the current now playing (MPD) with Icecast | |
By Melan | |
""" | |
import time | |
import os | |
import requests | |
from mpd import MPDClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
notify () { | |
echo "$(gdbus call --session \ | |
--dest org.freedesktop.Notifications \ | |
--object-path /org/freedesktop/Notifications \ | |
--method org.freedesktop.Notifications.Notify \ | |
MPD \ | |
$1 \ | |
"" \ | |
"Now Playing:" \ |
NewerOlder