Skip to content

Instantly share code, notes, and snippets.

@julcap
julcap / transmission.sh
Created January 2, 2021 13:20
Handle transmission-daemon
#!/usr/bin/env bash
EXECUTABLE_NAME="transmission-daemon"
USER="debian-transmission"
WORKDIR="/var/lib/transmission-daemon/.config/transmission-daemon"
function start {
sudo -u $USER $EXECUTABLE -f --log-error -g $WORKDIR &
}
@julcap
julcap / archive.sh
Created November 19, 2021 15:34
Automation to enctrypt/decrypt folders
#!/usr/bin/env bash
if [ ! $1 ]; then
echo -e "Usage\n"
echo -e "$0 { FOLDER | ENCRYPTED FILE }\n"
exit
fi
if [ -d $1 ]; then
tar cz $1 | openssl enc -aes-256-cbc -pbkdf2 -e > $1.encrypted
@julcap
julcap / mount_cifs.sh
Created November 20, 2021 13:52
Create local folders and mount remote cifs shares
# The standard way to add automatic mount is using /etc/fstab. The problem i found is that when remote shares are offline
# the computer is slow to boot because it waits for each entry in /etc/fstab to time out.
# Here i am automating the mounting of remote shares so i can run it after computer has finished boot via cronjob or manually.
# This script creates local directories if they do not exists and mounts the remote shares using cifs.
#!/usr/bin/env bash
IFS=,
MOUNT_ROOT=/mnt
REMOTE_FOLDERS="ubuntu,proxmox,TV Shows,Steam,Music,Mix,Learning,Movies,Emulators,Music Videos"
REMOTE_SERVER_IP=192.168.50.253
@julcap
julcap / WiiUKeyMerger.py
Created August 10, 2022 14:56
Merge and parse WiiU key files
# Instructions
# Run: python WiiKeyMerger.py file1.txt file2.txt
import os
import sys
OUTPUT_FILE = "merged_keys.txt"
def parse_and_remove_duplicates(file1, file2):
if os.path.exists(OUTPUT_FILE):