Skip to content

Instantly share code, notes, and snippets.

View MrDrMcCoy's full-sized avatar

Jeremy McCoy MrDrMcCoy

View GitHub Profile
@MrDrMcCoy
MrDrMcCoy / bash-assignment.md
Last active June 14, 2019 12:18
Bash scripting excersize

Bash coding assignment: Write a wrapper script for ffmpeg

ffmpeg is a command-line tool for transcoding (converting) media like video and audio files. It is extraordinarily powerful, but also not terribly easy or convenient to use. That's where the script comes in: Your goal is to set up a few defaults for yourself for when you need to use ffmpeg so that you don't have to remember or type out the whole command line.

While not strictly necessary, we will also be adding argument parsing, loops for dealing with multiple files, and error handling.

Requirements

Your script must accomplish the following things:

@MrDrMcCoy
MrDrMcCoy / Caddyfile
Created August 23, 2019 21:55
Run Nextcloud, Bitwarden_rs, and poste.io with Caddy proxy in Docker
yourhost.com {
redir / https://cloud.yourhost.com 301
}
cloud.yourhost.com {
tls [email protected]
header / Strict-Transport-Security "max-age=31536000;"
root /var/www/html
fastcgi / nextcloud:9000 php {
connect_timeout 1h

Keybase proof

I hereby claim:

  • I am mrdrmccoy on github.
  • I am mrdrmccoy (https://keybase.io/mrdrmccoy) on keybase.
  • I have a public key ASCbfHBqKdF_iQw-Ctf44D7VUBEmexsPsE4SzljIIwaQngo

To claim this, I am signing this object:

@MrDrMcCoy
MrDrMcCoy / rclone-eye.sh
Created July 7, 2021 19:05
Scrape the-eye.eu using rclone
#!/usr/bin/env bash
#####
# Scrape the-eye.eu using rclone
#####
trap 'exit 1' INT TERM KILL
rclone_opts=(
# --dry-run