Skip to content

Instantly share code, notes, and snippets.

View ncaldwell's full-sized avatar

Neil Caldwell ncaldwell

View GitHub Profile
@ncaldwell
ncaldwell / PingReporting.org
Last active February 8, 2020 12:56
echo google.com | xargs -I {} sh -c 'ping -c 1 {} && echo google is up || echo cant reach google'

Reporting server up from hosts with sh

Writing a script for cron

Want to check if a bunch of servers on your network are up every few minutes? Want to use things that you already have? Do it with a shell script and cron!

@ncaldwell
ncaldwell / mpvthumbselect.sh
Last active January 26, 2023 14:05
Select videos from $pwd using sxiv.
#!/bin/sh
#
# Select videos to watch with mpv from the current directory using sxiv.
#
# Caches screenshots for all the videos in the current directory, and then calls
# sxiv on the cache.
#
# requires: ffmpeg
# sxiv
# mpv