Skip to content

Instantly share code, notes, and snippets.

View KeystrokeCascade's full-sized avatar

keystroke KeystrokeCascade

View GitHub Profile
@KeystrokeCascade
KeystrokeCascade / remove-metadata.sh
Created December 4, 2025 13:01
Removes name and comment metadata from mp4 and mkv files from a directory recursively.
#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo "Usage: remove-metadata DIRECTORY
Removes name and comment metadata from mp4 and mkv files from a directory recursively."
exit 0
fi
dir=$1
exiftool -r -overwrite_original -ext mp4 -Title= -Comment= -Description= "$dir"
@KeystrokeCascade
KeystrokeCascade / E621Bridge.php
Created November 13, 2025 17:53
e621 bridge for rss-bridge
<?php
class e621Bridge extends BridgeAbstract
{
const MAINTAINER = 'keystroke';
const NAME = 'e621';
const URI = 'https://e621.net/';
const DESCRIPTION = 'Returns images from given page';
const PARAMETERS = [
@KeystrokeCascade
KeystrokeCascade / backup.sh
Created November 12, 2025 11:40
Backup script that syncs from a file containing directories/files to an offsite remote using rclone
#!/bin/bash
if [ $# -eq 0 ]; then
>&2 echo 'No backup file provided'
exit 1
fi
grep -ve '^$\|^#' "$1" | \
while read location; do
echo "Backing up $location"
@KeystrokeCascade
KeystrokeCascade / monitor-toggle.sh
Created November 26, 2023 14:29
Turn off a display to stop my monitor from switching to the "active" server input with my computer off
#!/bin/bash
export DISPLAY=:0.0
status=$(xset -q|sed -ne 's/^[ ]*Monitor is //p')
if [ $status = "On" ]; then
echo -e "Turning monitor off..."
xset dpms force off
elif [ $status = "Off" ]; then
echo -e "Turning monitor on..."
xset dpms force on