Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

neuthral neuthral

🎯
Focusing
  • finland
View GitHub Profile
@neuthral
neuthral / transmission_add_trackers.sh
Created Nov 26, 2022
add list of trackers to transmission downloads
View transmission_add_trackers.sh
#!/bin/bash
# Get transmission credentials, if set
if [[ -n "$TRANSMISSION_USER" && -n "$TRANSMISSION_PASS" ]]; then
auth="${TRANSMISSION_USER:-user}:${TRANSMISSION_PASS:-password}"
else
auth=
fi
#https://gist.github.com/neuthral/3690548c19a7740a9620794bc4537568/raw/62791f6884897420c96c86c121529f1ef1671b84/alive_trackers_26_11_2022.txt
#https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt
View alive_trackers_26_11_2022.txt
http://107.189.10.20.sslip.io:7777/announce
http://1337.abcvg.info:80/announce
http://207.241.226.111:6969/announce
http://207.241.231.226:6969/announce
http://bt.okmp3.ru:2710/announce
@neuthral
neuthral / loop.sh
Last active Nov 25, 2022
Loop through list of trackers and test if they are alive using nc
View loop.sh
#!/bin/bash
##
# Loop through list of trackers and test if they are alive using nc
# nc -v -z -w 3 -u "$host" "$port"
##
usage () {
printf '\n%s\n' "Loop through list of trackers and test if they are alive using nc"
printf '\n%s\n\n' "Usage: $(basename "$0") [list-of-trackers.file]"
@neuthral
neuthral / reduce.sh
Created Nov 23, 2022
count together numbers in a string until only one number from 1 - 9 remains [??vortex math??]
View reduce.sh
#!/bin/bash
STRING=$1
NUM=0
until [[ $STRING -lt 10 ]] do;
foreach n in $(echo $STRING | fold -w1); do
echo "$NUM + $n";
((NUM=NUM+n));
echo " = $NUM";
done;
@neuthral
neuthral / clean-sub.sh
Created Oct 9, 2022
clean youtube subtitle files and clean-up them for reading
View clean-sub.sh
echo $1
echo "Removing --> time stuff"
sed -i '/-->/d' $1
echo "Removing empty lines"
grep "\S" $1 > $1.txt
echo "wrap long lines to 96 characters"
fold -sw 96 $1.txt > $1.txt.fix
@neuthral
neuthral / youtube-get-sub.sh
Created Oct 8, 2022
youtube get video subtitles and cleant up the file for readability
View youtube-get-sub.sh
youtube-get-subs() {
echo "getting filenames..."
filename=$(youtube-dl --simulate --get-title $1)-$(youtube-dl --simulate --get-id $1)
echo "Downloading video data"
youtube-dl --continue --write-auto-sub --sub-format vtt --sub-lang en --write-thumbnail --write-description --skip-download $1
echo $filename
echo "Removing --> time stuff"
sed -i '/-->/d' $filename.en.vtt
echo "Removing empty lines"
grep "\S" $filename.en.vtt > $filename.txt
@neuthral
neuthral / encpass.sh
Created Aug 7, 2022
for using in plain text passwords
View encpass.sh
#!/bin/sh
################################################################################
# Copyright (c) 2020 Plyint, LLC <contact@plyint.com>. All Rights Reserved.
# This file is licensed under the MIT License (MIT).
# Please see LICENSE.txt for more information.
#
# DESCRIPTION:
# This script allows a user to encrypt a password (or any other secret) at
# runtime and then use it, decrypted, within a script. This prevents shoulder
# surfing passwords and avoids storing the password in plain text, which could
View tty_colors.sh
echo -en "\e]P0232323" #black
echo -en "\e]P8882B99" #darkgrey
echo -en "\e]P1D75F5F" #darkred
echo -en "\e]P9E33636" #red
echo -en "\e]P287AF5F" #darkgreen
echo -en "\e]PA98E34D" #green
echo -en "\e]P3D7AF87" #brown
echo -en "\e]PBFFD75F" #yellow
echo -en "\e]P48787AF" #darkblue
echo -en "\e]PC7373C9" #blue
View docker_keybase_cli.sh
#!/bin/sh
image_name="keybaseio/client:latest"
contname="keybase"
nodename="--hostname=${contname}"
runname="--name=${contname}"
run_rm="--rm=true"
# build_rm="--force-rm=true"
ports=""
volumes="-v ~/.keybase:/home/keybase/.config/keybase"
with_tty="--tty"
View mpv.conf
# ~/.config/mpv/mpv.conf
#The default profile which sets some recommended settings
profile=gpu-hq
#The called API
#Use "opengl" if you have compatibility issues
gpu-api=vulkan
vo=gpu #tct
#Decoding API for 8bit h264 (or whatever your CPU supports) content
#Only should be used when you get many frame drops