Skip to content

Instantly share code, notes, and snippets.

View Hurricos's full-sized avatar

Martin Kennedy Hurricos

  • Physician's Computer Company
  • Burlington, VT
View GitHub Profile
@Hurricos
Hurricos / Insert.scad
Created April 7, 2025 03:53
Lab B label SCAD file
module insert() {
polygon(points=[[3,0],[48,0],[50.5,10],[51,29],[0,29],[0.5,10]]);
}
for (dx=[0:51:254]) {
for(dy=[0:30:209]) {
translate([dx,dy,0]) insert();
}
}
@Hurricos
Hurricos / hosts.sh
Created September 28, 2023 19:52
Ansible hosts compilation script
#!/bin/sh
# This script generates different host groups by
## - running each executable program it can find in `/etc/ansible/hosts.d/`, and
## - consuming every file it can find in `/etc/ansible/hosts.d/static/*.json`
if [ -d /etc/ansible/hosts.d ]; then
ls /etc/ansible/hosts.d/* >/dev/null 2>&1 &&
for program in /etc/ansible/hosts.d/*; do
if [ -f "$program" -a -x "$program" ]; then
@Hurricos
Hurricos / 0001-Build-with-snippets-from-sqlean.patch
Created March 17, 2022 20:57
Patches atop `sqlite-src-3380100` to compile-in sqlean extensions
From ec30ab9c2cee2e79fec387f8a5f46c88f3e63c67 Mon Sep 17 00:00:00 2001
From: Martin Kennedy <mkennedy@pcc.com>
Date: Thu, 17 Mar 2022 16:53:24 -0400
Subject: [PATCH] Build with snippets from sqlean
Note that to compile, after applying this patch, use
```sh
./configure CFLAGS='--static';
make -j8 sqlite3;
@Hurricos
Hurricos / dmesg.txt
Created March 5, 2022 20:59
ZyXEL GS1900-24 v1 dmesg log
[ 0.000000] Linux version 5.10.102 (labby@lobon) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19044+1-545cabee9e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Sat Mar 5 19:02:36 2022
[ 0.000000] RTL838X model is 83826800
[ 0.000000] SoC Type: RTL8382
[ 0.000000] Kernel command line: console=ttyS0,115200 mem=64M quiet
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019070 (MIPS 4KEc)
[ 0.000000] MIPS: machine is ZyXEL GS1900-24 v1 Switch
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Using appended Device Tree.
[ 0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
@Hurricos
Hurricos / bcache_example.sh
Last active April 19, 2021 15:03
Fast, safe storage with bcache
#!/bin/bash
#### Booting:
# Boot UEFI Linux from USB. You can add to this a single SSD if you want, but
# it needn't be fast: applications and config files will live mostly in RAM
# during the lifetime of the system, and should be small enough that you can
# have directly nightly backups should the USB fail, which happens often enough.
#### Caching device:
# Use two PCIe to NVMe adapters -- just PCBs that route four lanes PCIe to NVMe,
@Hurricos
Hurricos / MR12_bootlog.txt
Last active December 12, 2020 19:59
MR12 OpenWrt ath79 bootlog
[ 0.000000] Linux version 5.4.80 (labby@lobon) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14947-0f7a3288e1)) #0 Sat Nov 28 02:03:32 2020
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[ 0.000000] MIPS: machine is Meraki MR12
[ 0.000000] SoC: Atheros AR7242 rev 1
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]