Skip to content

Instantly share code, notes, and snippets.

View visualblind's full-sized avatar

Travis Runyard visualblind

View GitHub Profile
@visualblind
visualblind / ffmpeg_examples.sh
Last active October 23, 2023 13:17
FFmpeg CLI Examples with Comments (transcoding, remuxing, metadata stuff, thumbnail generation, nvidia hw-accel cuda h264_nvenc, bash looping, etc)
############################ FFmpeg CLI Examples ############################
-metadata[:metadata_specifier] key=value (output,per-metadata)
For example, for setting the title in the output file:
ffmpeg -i in.avi -metadata title="my title" out.flv
To set the language of the first audio stream:
ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT
@visualblind
visualblind / template.sh
Created October 20, 2023 12:14
Bash Script Template (not POSIX/shell compliant)
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@visualblind
visualblind / librewolf.overrides.cfg
Last active October 23, 2023 14:06
LibreWolf browser custom overrides
/** TRAVIS CUSTOM OVERRIDES */
pref("browser.urlbar.trimURLs", false);
pref("browser.aboutConfig.showWarning", false);
defaultPref("identity.fxaccounts.enabled", true); // firefox sync
pref("privacy.clearOnShutdown.history", false);
pref("privacy.clearOnShutdown.downloads", true);
// Resist Fingerprinting RFP
pref("privacy.resistFingerprinting.testGranularityMask", 4);
@visualblind
visualblind / my-ublock-backup_2023-10-18_19.51.39.txt
Last active October 19, 2023 02:55
My uBlock Origin: 1.52.2 Settings
{
"timeStamp": 1697683899581,
"version": "1.52.2",
"userSettings": {
"cloudStorageEnabled": true,
"uiAccentCustom": true,
"uiAccentCustom0": "#fdfac5",
"uiTheme": "dark",
"importedLists": []
},
@visualblind
visualblind / fix.sh
Created May 11, 2023 22:22 — forked from famousgarkin/fix.sh
ffmpeg fix "Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it."
ffmpeg -i "in.avi" -bsf:v mpeg4_unpack_bframes -vcodec copy "out.avi"
@visualblind
visualblind / README.md
Last active September 15, 2022 06:35
NextCloud Talk Bot Custom Commands

NextCloud Talk Bot Custom Commands

Offical nextcloud documentation

The Talk add-on allows returning information when the user invokes a command preceded with a forward-slash. I have created 3 custom commands that help NextCloud admins know certain server information that would otherwise have to come from other tools ie: monitoring/graphing software:

  1. Disk space used, available, and percent used via df utility
  2. Latency related info via common ping utility (install if not exists for you, normally net-utils pkg or similar)
  3. Listing server-side mounts via standard mount command
@visualblind
visualblind / df.sh
Last active July 18, 2022 14:34
Nextcloud Talk Chat Commands: Diskspace, Ping
#!/usr/bin/env bash
BIN_DF=$(which "df")
if ! [ -x "$BIN_DF" ]; then
echo "df (coreutils package) not installed."
echo "See the official documentation for more information"
exit 1
fi
case "$1" in

Keybase proof

I hereby claim:

  • I am visualblind on github.
  • I am darkzealot (https://keybase.io/darkzealot) on keybase.
  • I have a public key ASDu_uV4-mU4TRaK6BXQIf4uP96mDJyvePSG7RFQ6I5Zgwo

To claim this, I am signing this object:

@visualblind
visualblind / tmux.md
Created March 13, 2022 17:20 — forked from russelldb/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a