This file contains hidden or 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 | |
# Check if the user has provided a device or partition argument | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 <device>" | |
exit 1 | |
fi | |
DEVICE=$1 |
This file contains hidden or 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 | |
# Check if the user has provided a device argument | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <device>" | |
exit 1 | |
fi | |
DEVICE=$1 |
This file contains hidden or 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
# Improved Windows 10 backup script to backup a Windows 10 installation (EFI or MBR) using the /dev/ name, e.g. if on sda run "sh win10backup.sh sda" | |
PART=$1 | |
# Check if partition is provided | |
if [ -z "$PART" ]; then | |
echo "Error: Partition not specified" | |
exit 1 | |
fi |
This file contains hidden or 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
[Unit] | |
Description=rclone sftp service | |
Documentation=man:rclone(1) | |
After=network.target auditd.service | |
[Service] | |
ExecStart=rclone serve sftp --no-auth --addr :2022 \ | |
--vfs-cache-mode full \ | |
--vfs-cache-max-age 10m \ | |
--vfs-cache-max-size 32768 \ |
This file contains hidden or 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
[Unit] | |
Description=rclone dlna service | |
Documentation=man:rclone(1) | |
After=network.target auditd.service | |
[Service] | |
ExecStart=rclone serve dlna --addr :8080 \ | |
--vfs-cache-mode full \ | |
--vfs-cache-max-age 60m \ | |
--vfs-cache-max-size 32768 \ |
This file contains hidden or 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
# ./dlna.sh 8080 /mnt/data/audio | |
PORT=$1 | |
DATA_DIR=$2 | |
NAME=`basename $DATA_DIR` | |
CACHE_DIR=/var/cache/dlna/$NAME | |
#rm -fR $CACHE_DIR | |
mkdir -p $CACHE_DIR | |
chmod -fR 777 $CACHE_DIR | |
/home/linuxbrew/.linuxbrew/bin/rclone serve dlna --addr :$PORT $DATA_DIR --buffer-size 1G --dir-cache-time 24h --cache-dir $CACHE_DIR --vfs-cache-mode full --vfs-cache-max-size 1G --vfs-cache-max-size 16M --no-checksum --no-modtime --vfs-case-insensitive --vfs-disk-space-total-size 4G --name $NAME 2>&1 > /var/log/rclone.log & | |
exit 0 |
This file contains hidden or 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
# ./dav.sh 8090 /mnt/data/joplin | |
PORT=$1 | |
DATA_DIR=$2 | |
NAME=`basename $DATA_DIR` | |
CACHE_DIR=/var/cache/dav/$NAME | |
#rm -fR $CACHE_DIR | |
mkdir -p $CACHE_DIR | |
chmod -fR 777 $CACHE_DIR | |
/home/linuxbrew/.linuxbrew/bin/rclone serve webdav --user $NAME --pass $NAME --addr :$PORT $DATA_DIR --buffer-size 512M --dir-cache-time 15m --cache-dir $CACHE_DIR --vfs-cache-mode full --vfs-cache-max-size 4G --vfs-cache-max-size 1G --no-checksum --vfs-case-insensitive --vfs-disk-space-total-size 4G 2>&1 > /var/log/rclone.log & | |
exit 0 |
This file contains hidden or 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
# ./dav.sh 8090 /mnt/data/joplin | |
PORT=$1 | |
DATA_DIR=$2 | |
NAME=`basename $DATA_DIR` | |
CACHE_DIR=/var/cache/dav/$NAME | |
#rm -fR $CACHE_DIR | |
mkdir -p $CACHE_DIR | |
chmod -fR 777 $CACHE_DIR | |
/home/linuxbrew/.linuxbrew/bin/rclone serve webdav --htpasswd $DATA_DIR/.htpasswd --addr :$PORT $DATA_DIR --buffer-size 512M --dir-cache-time 15m --cache-dir $CACHE_DIR --vfs-cache-mode full --vfs-cache-max-size 4G --no-checksum --vfs-case-insensitive --vfs-disk-space-total-size 4G 2>&1 > /var/log/rclone.log & | |
exit 0 |
This file contains hidden or 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 | |
# Default values | |
MODEL="$HOME/src/whisper.cpp/models/ggml-large-v3-turbo-q5_0.bin" | |
INPUT_FILE="" | |
OUTPUT_FILE="$TEMP/whisper-$(date "+%Y%m%d%H%M%S").wav" | |
WHISPER_ARGS="-m $MODEL -l en -t 12 -pp -pc -otxt -ovtt -osrt" | |
# Function to display usage information | |
usage() { |
This file contains hidden or 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 | |
# NOTE this is actually using whisper-wrapper.sh: https://gist.github.com/vijinho/ad9bd80c990a803efef7f96ae3e7ee98 | |
# Function to display usage information | |
usage() { | |
echo "Usage: $0 [-m | --media-directory <directory>] [-a | --transcription-args \"<arguments>\"]" | |
echo "Defaults: -m `pwd`" | |
exit 1 | |
} |