Skip to content

Instantly share code, notes, and snippets.

View conceptblend's full-sized avatar

Andrew Wright conceptblend

View GitHub Profile
@conceptblend
conceptblend / trmnl-alias-images.md
Created August 24, 2025 18:47
Docs for commands to prep images for the TRMNL ALIAS plug-in in 2-bit

Reminder: As of writing this, 2-bit images on TRMNL are still experimental and must be under ~48,000 bytes (not 48KB).

Commands

Make colormap

Creating the COLORMAP so the output is fit for purpose on the TRMNL.

@conceptblend
conceptblend / osx_bootstrap.sh
Last active April 22, 2024 17:13 — forked from codeinthehole/osx_bootstrap.sh
Script to install stuff I want on a new OSX machine
#!/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
@conceptblend
conceptblend / sri.sh
Created May 1, 2020 15:55
Create a sub-resource integrity (SRI) hash for a script from the command line
#!/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
@conceptblend
conceptblend / estimated-read-time.js
Created March 5, 2017 20:15
Javascript used in bookmarklet to measure estimated reading time on page.
/* 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;