Skip to content

Instantly share code, notes, and snippets.

View jabenninghoff's full-sized avatar

John Benninghoff jabenninghoff

View GitHub Profile
@jabenninghoff
jabenninghoff / mac-open-man-as-pdf.md
Created August 31, 2020 04:13
Open a man page as a PDF on macOS

macOS: open a man page as a PDF

From the command line:

man -t <manpage> | open -f -a Preview.app

-t outputs as postscript, which Preview automatically converts to PDF.

@jabenninghoff
jabenninghoff / .zshrc
Last active June 26, 2023 19:56
Add homebrew to environment if installed (arm or intel)
# remove /usr/local/bin from /etc/paths
export PATH="$PATH:s/\/usr\/local\/bin://"
# add homebrew to environment
if [ -x /usr/local/bin/brew ]
then
eval "$(/usr/local/bin/brew shellenv)"
elif [ -x /opt/homebrew/bin/brew ]
then
export PATH="/usr/local/bin:/usr/local/sbin${PATH+:$PATH}"
@jabenninghoff
jabenninghoff / update-docker-images.sh
Created September 1, 2023 21:42
Update Docker Images
docker images | awk '/^[a-z]/ { print $1}' | sed 's/.*/docker pull &/' | sh