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
<# | |
sortTorrentsByTracker.ps1 | |
Sort .TORRENT files into subdirectories named after the tracker indicated in the file | |
Place this powershell script inside your /torrents directory, run the script and wait. | |
When finished, you will find all torrents organized into sub directories per tracker. | |
#> | |
$allfiles = gci "*.torrent" | |
$ToNatural= { [regex]::Replace($_, '\d+',{$args[0].Value.Padleft(20)})} # Define natural sort method |
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
# Set to true to test the script | |
$whatIf = $false | |
# Remove hidden files, like thumbs.db | |
$removeHiddenFiles = $true | |
# Get hidden files or not. Depending on removeHiddenFiles setting | |
$getHiddelFiles = !$removeHiddenFiles | |
# Remove empty directories locally |
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
$items = gci .\ -Recurse -File -Include *480p*, *720p*, *1080p* | |
foreach($item in $items) { | |
if($item.Name -like "*480p*") { | |
Move-Item -LiteralPath $item 'G:\path\480p' | |
} elseif($item.Name -like "*720p*") { | |
Move-Item -LiteralPath $item 'G:\path\720p' | |
} elseif ($item.Name -like "*1080p*") { | |
Move-Item -LiteralPath $item 'G:\path\1080p' |
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 | |
# alpha-organize.sh | |
##################### | |
# The following script is to help organize a directory of directories into alphabetical groups based on their initial characters | |
# This is useful for organizing a large directory of movies into alphabetical groups for easier importing into Radarr | |
##################### | |
# Set the source directory - this is the directory that contains the movies to be organized, this directory should contain only directories |
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 | |
# Controls a dropdown terminal for use in i3wm | |
DISPLAY_WIDTH=1920 | |
DISPLAY_HEIGHT=1080 # May be usefull... | |
TERMINAL_WIDTH=900 | |
TERMINAL_HEIGHT=400 | |
TERMINAL_X=$(( (DISPLAY_WIDTH - TERMINAL_WIDTH)/2 )) | |
TERMINAL_Y=500 |
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 | |
root="." | |
filecount=$(find "$root" -type f | wc -l) | |
find "$root" -iname \*.avi -o -iname \*.mp4 -o -iname \*.mkv -o -iname \*.m4v -o -iname \*.wmv -o -iname \*.mov -o -iname \*.mpg -o -iname \*.mpeg -o -iname \*.wma -o -iname \*.asf -o -iname \*.asx -o -iname \*.rm -o -iname \*.3gp -o -iname \*.0gm | { | |
processed=0 | |
corrupt=0 | |
while read -r pathname | |
do | |
if ! ffprobe -v quiet -show_error -i "$pathname" | |
then |
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 | |
# Logging needs if I recall corectly | |
# Set the path to the directory where you want to move the files with missing audio | |
target_dir=/path/to/target | |
# Set the path to the log file | |
log_file=/path/to/log |
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 | |
# Define the directory containing the images to sort | |
DIR=/path/to/images | |
# Define the maximum dimensions for each category | |
BIG_MAX_WIDTH=1024 | |
BIG_MAX_HEIGHT=1024 | |
SMALL_MAX_WIDTH=512 | |
SMALL_MAX_HEIGHT=512 |
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 | |
## Move dirs containing more than 1 file to a specific dir | |
## initialize newdir from 1st argument (or default: OOOO3_MORE_THAN_ONE) | |
newdir="${1:-dupes}" | |
## set your complete path from 2nd arg (or '.' by default) | |
cmpltpath="${2:-.}" |
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 | |
cd /tmp || exit | |
echo "Downloading Postman ..." | |
wget -q https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz | |
tar -xzf postman.tar.gz | |
rm postman.tar.gz | |
echo "Installing to opt..." | |
if [ -d "/opt/Postman" ];then | |
sudo rm -rf /opt/Postman |
OlderNewer