Skip to content

Instantly share code, notes, and snippets.

View 6ftClaud's full-sized avatar

Claud 6ftClaud

  • Vinted
  • Lithuania
  • 21:12 (UTC +02:00)
View GitHub Profile
@6ftClaud
6ftClaud / qbittorrent-remove-unregistered.py
Last active August 25, 2022 09:23
Remove unregistered torrents
#!/usr/bin/python3
# Needs to have
# pip install qbittorrent-api
# Docs
# https://qbittorrent-api.readthedocs.io/en/latest/api.html
from qbittorrentapi import Client
@6ftClaud
6ftClaud / mktorrent.sh
Created August 6, 2022 19:02
Create a torrent with mktorrent
#!/usr/bin/bash
read -p "Torrent source: " source
read -p "Comment: " comment
name=$(basename "${source}")
mktorrent \
-p `# Private torrent - not distributed on DHT` \
-a udp://opentracker.i2p.rocks:6969/announce `# Tier 0` \
-a udp://tracker.openbittorrent.com:6969/announce `# Tier 1` \
@6ftClaud
6ftClaud / fix_permissions.sh
Created June 5, 2021 15:32
Shell script to fix file permissions.
#!/bin/bash
directory="$*"
if [ -z "$directory" ];then
echo "You must pass a directory path"
exit 1
fi
read -r -p "Correct ${directory} file and folder permissions? [y/N] " chse
if [[ "$chse" =~ ^([yY][eE][sS]|[yY])+$ ]]; then