Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env zsh -f
# Purpose: This script will email all PDFs from one folder to a designated recipient
#
# Note: this script uses 'emate' which is a part of MailMate.app (https://freron.com)
# and assumes that the app is already properly configured to send email.
# change this to the email address you want to send the files to
MAIL_TO='admin@notreal.com'
# this is the folder where the PDFs will be sent from
@tjluoma
tjluoma / di-skypecallrecorder.sh
Last active October 10, 2020 20:12
If you customize one line in this script, it will download and install / update Skype Call Recorder.
#!/usr/bin/env zsh -f
# Purpose: Download and install the latest version of Skype Call Recorder
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2018-08-22
# you MUST customize this URL to be your URL from ECamm
# it ends with your email address (URL encoded) and a 6 digit personal code
@tjluoma
tjluoma / podcastdownloader.sh
Created September 2, 2020 01:25
Download all enclosures in a podcast/RSS feed
#!/usr/bin/env zsh -f
# Purpose: Download enclosures from a podcast feed
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2020-09-01
# this is a variable we can use to refer to the name of this script
# for example, if the filename is
# /usr/local/bin/podcastdownloader.sh
@tjluoma
tjluoma / macos-is-at-least.sh
Last active April 6, 2023 18:40
zsh script to compare macOS Versions - see https://rhymeswithdiploma.com/2020/07/10/macos-is-at-least/ for full explanation
#!/bin/zsh -f
# Purpose: Check to see if we are running on Big Sur
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2020-07-10
PATH="/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin"
# this will check to make sure `sw_vers` exists
@tjluoma
tjluoma / km-timemachine-mount-run-unmount.sh
Last active November 20, 2023 07:52
a variation of 'timemachine-mount-run-unmount.sh' meant to be used with Keyboard Maestro
#!/usr/bin/env zsh -f
# Purpose: Once you set the DEVICE,
# this script will mount your Time Machine drive,
# run Time Machine,
# and then unmount the drive
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2020-04-20
#!/usr/bin/env zsh -f
# This tells the script to get the $PATH from the ~/.path file if it exists
# otherwise it will use the second $PATH in the "else" clause
if [[ -e "$HOME/.path" ]]
then
source "$HOME/.path"
else
PATH='/usr/local/scripts:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin'
fi
@tjluoma
tjluoma / bulkocrpdfs.sh
Created March 28, 2020 03:05
This script will bulk OCR all of the PDFs in a given directory. https://github.com/jbarlow83/OCRmyPDF is doing all of the hard work, TBH.
#!/usr/bin/env zsh -f
# Purpose: OCR all of the PDFs in a given directory
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2020-03-27
# ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️ !!! ⚠️⚠️⚠️
# !!! ⚠️⚠️⚠️ you *MUST* change this to the directory where all of your PDFs are that you want to OCR !!!
DIR="$HOME/AllMyPDFs"
@tjluoma
tjluoma / cue2csv.sh
Created March 6, 2020 17:41
take a .cue file and output a CSV showing timestamp and chapter title. See <https://talk.automators.fm/t/extract-chapters-from-mp3/6797>
#!/usr/bin/env zsh -f
# Purpose: take a .cue file and create a .csv showing timestamp first and chapter title second
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2020-03-06
NAME="$0:t:r"
if [[ -e "$HOME/.path" ]]
@tjluoma
tjluoma / Open in Marked.sh
Last active February 27, 2020 21:39
BBEdit script to open the current file in Marked 2
#!/usr/bin/env zsh -f
#
# Author: Timothy J. Luoma
# Email: luomat at gmail dot com
# Date: 2018-08-23
#
# Purpose: BBEdit Script to open the current file in Marked 2 <http://marked2app.com>
NAME="$0"
@tjluoma
tjluoma / youtube-rss.sh
Last active January 3, 2023 09:00
Did you know YouTube has RSS feeds? No? Probably because YouTube makes them nearly impossible to find. But here's an easy way to get the RSS feed for any YouTube user. Inspired by <https://eggfreckles.net/notes/youtube-rss/>
#!/usr/bin/env zsh -f
# Purpose: get the RSS feed for a YouTube page
# Inspired By: https://eggfreckles.net/notes/youtube-rss/
# Gist: https://gist.github.com/tjluoma/fdbc63ceb78a2aecd3d638fd18b6ec6e
#
# From: Timothy J. Luoma
# Mail: luomat at gmail dot com
# Date: 2020-01-17; updated 2021-01-10
# 2021-01-10 YouTube currently has both 'rssUrl' and