A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
#!/bin/bash | |
total_rss=0 | |
total_vsz=0 | |
total_size=0 | |
while read -r size rss vsz user command; do | |
total_rss=$((total_rss+rss)) | |
total_vsz=$((total_vsz+vsz)) | |
total_size=$((total_size+size)) |
#!/bin/bash | |
# This exists because I couldn't figure out to to make | |
# any of the relevant system units wait for my zpool to become available | |
# before importing it. | |
# | |
# zpool `tank` is a ThunderBay 6 connected via Thunderbolt 3. | |
# | |
# bolt.service -> ? -> zfs-import-cache | |
# ? is possibly just time as it takes a bit for the drives to spin up. | |
# The nvme pools work fine, for example. |
#!/bin/bash | |
set -e | |
# trap keyboard interrupt (control-c) | |
trap control_c INT | |
# Must be run as root | |
# requires: | |
# - wget | |
# - pax |
#!/bin/bash | |
ls -d /usr/src/linux-headers-* \ | |
| sed -e 's/.*linux-headers-//' \ | |
| grep generic \ | |
| sort -V \ | |
| tac \ | |
| sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start |
#!/bin/bash | |
# iPXE build depends | |
apt-get install -y liblzma-dev git build-essential | |
# clone iPXE | |
[ ! -d ./ipxe ] && git clone http://git.ipxe.org/ipxe.git | |
cd ipxe/src | |
make clean | |
sed -i 's/#undef\tDOWNLOAD_PROTO_HTTPS/#define\tDOWNLOAD_PROTO_HTTPS/' config/general.h |
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
#!/bin/bash | |
umask 022 | |
{% if letsencrypt_eab %} | |
server={{ letsencrypt_server }} | |
kid={{ letsencrypt_eab_kid }} | |
hmac={{ letsencrypt_eab_hmac }} | |
acmeurl={{ letsencrypt_acmeurl }} | |
{% elif letsencrypt_testmode %} | |
server=acme-staging-v02.api.letsencrypt.org |
Assumes you run Traefik.
You need to checkout the repository so you can mount the server
and client
directories into the container.
git clone https://github.com/RobinLinus/snapdrop.git
Then modify docker-compose.yml
and create templates/default.conf.template
.
This is a script I made to check the health of the ZFS pools on my Ubuntu server and send a notification with a summary to a Discord server channel (see image of example notification below) I have made for my servers. I borrowed and modified some parts for the actual ZFS health check from this Gist. The script checks ZFS pools overall condition, capacity, errors and time since last scrub. If an issue is detected with a pool a role on the Discord channel is pinged.
This script is only tested on Ubuntu Server 20.04.
Copy the two bash files to a Linux server with ZFS pools and modify as required based on distro/version. Fill inn the Discord variables in the discord-variables.sh file.
#!/bin/bash | |
# See http://apple.stackexchange.com/questions/107307/how-can-i-install-the-command-line-tools-completely-from-the-command-line | |
echo "Checking Xcode CLI tools" | |
# Only run if the tools are not installed yet | |
# To check that try to print the SDK path | |
xcode-select -p &> /dev/null | |
if [ $? -ne 0 ]; then | |
echo "Xcode CLI tools not found. Installing them..." |