Entries
Google Photos - It's Bigger on the Inside
Christmas family IT support ticket involving Google Photos and infinity.
— 2024-12-25
How to manage Python versions and packages
Instructions on how to easily set up python virtual environments.
— 2024-10-05
A simpler shell prompt
TIL about fzf built-in history command, fc
, that keeps track of when you issue commands and how long they take to complete. It’s critical info when I need it, but I regularly don’t need it and so far I had been printing timestamps as part of my shell prompt. Time to update my aliases.zsh
:
alias h='fc -lt "%b %d %H:%M:%S"'
alias history="echo 'use h'" # Reduce unnecessary keystrokes while we're at this
Prompt BEFORE:
— 2024-09-14Crowdstrike causes global outage
Thoughts on the recent Crowdstrike global outage.
— 2024-08-03
47% Space Savings Migrating from JPG to WebP
Today I converted all images on this hugo site, mostly travel photographs, from, mostly, JPEG to WebP because it seems like a widely supported format that is more efficient and covers both lossy and lossless use cases.
I used the following script which relies on Google’s WebP Converter.
# Create WebP files
$ find Public/ -depth -name "*.png" -exec sh -c 'cwebp -preset picture -q 95 -hint picture "$1" -o "${1%.png}.webp"' _ {} \;
$ find Public/ -depth -name "*.jpeg" -exec sh -c 'cwebp -preset picture -q 95 -hint picture "$1" -o "${1%.jpeg}.webp"' _ {} \;
$ find Public/ -depth -name "*.jpg" -exec sh -c 'cwebp -preset picture -q 95 -hint picture "$1" -o "${1%.jpg}.webp"' _ {} \;
# Update entries references to use WebP
find Public -type f -name '*.md' -exec sed -i '' s/\.jpg/\.webp/g {} +
find Public -type f -name '*.md' -exec sed -i '' s/\.png/\.webp/g {} +
find Public -type f -name '*.md' -exec sed -i '' s/\.jpeg/\.webp/g {} +
Space used by images: BEFORE: 650Mb of images AFTER: 412Mb
— 2022-08-24