Skip to content

Instantly share code, notes, and snippets.

View hobbsy's full-sized avatar

Jim Hobbs hobbsy

View GitHub Profile
aileftech / hex-colors.txt
Created October 1, 2022 18:10
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
RhetTbull /
Last active April 3, 2024 17:49
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
import pathlib
cellularmitosis /
Last active April 16, 2023 17:49
Quick-n-dirty QEMU script to spin up Debian on various CPU's
geerlingguy /
Last active March 23, 2024 02:38
Raspberry Pi Benchmark Suite - Phoronix
# Benchmark script for Raspberry Pi OS.
# WARNING: This script is meant to be run as the root user.
# This script should never be run on a system/partition you
# care about. You should only run this on a system that you
# intend to use only for benchmarking and can reinstall or
# re-flash easily.
geerlingguy /
Last active March 28, 2024 15:20
Raspberry Pi CPU temperature and throttling test script
# Raspberry Pi stress CPU temperature measurement script.
# Download this script (e.g. with wget) and give it execute permissions (chmod +x).
# Then run it with ./
# NOTE: In recent years, I've switched to using s-tui. See:
# Variables.
leodutra /
Last active April 5, 2024 23:44
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist



daviddarnes / gulpfile.js
Last active June 10, 2023 01:17
Import your Ghost posts into a Jekyll project using Gulp
const File = require('vinyl');
const gulp = require("gulp");
const Handlebars = require('handlebars');
const streamArray = require('stream-array');
const ghostContentAPI = require("@tryghost/content-api");
const api = new ghostContentAPI({
url: '',
key: '22444f78447824223cefc48062',
version: "v4"
rcarmo / bt-agent.service
Last active December 12, 2023 13:14
Set up PAN networking on Raspbian Stretch (use sudo to create these files and run all commands)
# in /etc/systemd/system
Description=Bluetooth Agent
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
GavinJoyce / youtube.rb
Created July 24, 2017 08:36
Simple YouTube subscriber and view count script for MacBook Pro Touch Bar (see
#!/usr/bin/env ruby
# See for details on how to use this
require 'net/http'
require 'json'
ntrepid8 /
Created June 28, 2017 02:18
Script to run speedtest-cli via cron and log the results
#!/usr/bin/env bash
if result=$(/usr/bin/speedtest --simple); then
parsed_result=$(printf "${result}\"" | sed ':a;N;$!ba;s/\n/" /g' | sed 's/: /="/g')
printf "[$(date)] ${parsed_result}\n" >> "${LOG_PATH}"
printf "[$(date)] error\n" >> "${LOG_PATH}"
exit 1