Reminder: As of writing this, 2-bit images on TRMNL are still experimental and must be under ~48,000 bytes (not 48KB).
Creating the COLORMAP so the output is fit for purpose on the TRMNL.
| #!/usr/bin/env bash | |
| # | |
| # Bootstrap script for setting up a new OSX machine | |
| # | |
| # This should be idempotent so it can be run multiple times. | |
| # | |
| # Some apps don't have a cask and so still need to be installed by hand. These | |
| # include: | |
| # | |
| # - SVGSUS |
| #!/bin/bash | |
| if [ "$1" ]; then | |
| echo | |
| echo "The subresource integrity hash for $1 is:" | |
| hash=$( curl -s $1 | openssl dgst -sha384 -binary | openssl base64 -A ); | |
| echo | |
| echo "<script src=\"$1\" integrity=\"sha384-$hash\" crossorigin=\"anonymous\"></script>" | |
| fi |
| /* Code used in bookmarklet to measure estimated reading time on page. */ | |
| /* Make a bookmarklet here: http://ted.mielczarek.org/code/mozilla/bookmarklet.html */ | |
| var contentNode = "", | |
| textContent = "", | |
| selector = 'body', | |
| words = [], | |
| estimatedReadTime = 0, | |
| avgWPM = 275; |