Skip to content

Instantly share code, notes, and snippets.

View chapmanjacobd's full-sized avatar
🥅
goal_net

Jacob Chapman chapmanjacobd

🥅
goal_net
View GitHub Profile
@chapmanjacobd
chapmanjacobd / planet.wiki.POIs.sh
Last active April 12, 2026 00:46
OSM planet.pbf to Wikipedia POIs
osmium tags-filter planet-260330.osm.pbf /wikipedia -o wikipedia_pois.osm.pbf
# (one hour)
osmium export wikipedia_pois.osm.pbf -f jsonseq --format-option=print_record_separator=false | \
jq -sc 'group_by(.properties.wikipedia) | map(max_by(.properties | length)) | sort_by(.properties | length) | reverse[]' \
> grouped_by_wikipedia.geojsonl
# (six hours)
# .rw-r--r--@ 9.7G xk 9 Apr 16:09 grouped_by_wikipedia.geojsonl
rm -f wikipedia_pois.osm.pbf
@chapmanjacobd
chapmanjacobd / setup_ssh.sh
Last active March 31, 2026 18:15
postmarketOS setup SSH
read -p "GitHub Username: " U
mkdir -p ~/.ssh && chmod 700 ~/.ssh
curl -s "https://github.com/$U.keys" > ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
sudo systemctl enable --now sshd
@chapmanjacobd
chapmanjacobd / IA upload step.yaml
Created February 24, 2026 17:27
uploading to Internet Archive from GitHub Actions
- name: Upload to Internet Archive
working-directory: nspawn-loop
env:
IA_ACCESS_KEY: ${{ secrets.IA_ACCESS_KEY }}
IA_SECRET_KEY: ${{ secrets.IA_SECRET_KEY }}
run: |
set -euo pipefail
pipx install internetarchive
export PATH="$PATH:$HOME/.local/bin"

GitHub Actions rerun

gh run list --repo chapmanjacobd/iiab --workflow="image-raspios.yml" --status in_progress --json databaseId --jq '.[].databaseId' | xargs -r -n1 gh run cancel --force --repo chapmanjacobd/iiab
gh workflow run --repo chapmanjacobd/iiab --ref raspios-img image-raspios.yml

gh run list --repo chapmanjacobd/iiab --workflow="image-raspios.yml" --json url,workflowName,number,conclusion --template '{{range .}}#{{.number}} {{if eq .conclusion "success"}}{{autocolor "green" .conclusion}}{{else}}{{autocolor "red" .conclusion}}{{end}} {{hyperlink .url (autocolor "blue+u" .workflowName)}}{{"\n"}}{{end}}' --limit 3

@chapmanjacobd
chapmanjacobd / postclusterfxk.log
Last active November 25, 2025 21:33
Fedora 41 to 43 postgresql 16 to 18 with postgis
There was a lot of failed attempts* (see below) but what worked for me went something like this:
p$ = sudo su - postgres
---
Install the PGDG repo https://www.postgresql.org/download/linux/redhat/
# dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/F-43-x86_64/pgdg-fedora-repo-latest.noarch.rpm
I just thought this was interesting--so copying here. Not my words:
In this article I (Edmundo Carmona) will describe an experience I had that began with the failure of some RAID5 disks at the Hospital of Pediatric Especialties, where I work. While I wouldn’t wish such an event on my worst enemy, it was something that made me learn about the power of knowledge—a deep knowledge, which is so important in the hacking culture.
Are you in dire straights with your hard drive?
We at Free Software Magazine had a major hardware crash. The good guys at DTI DATA performed hard drive recovery and saved our magazine!
Friday, April 29, 2005
This article has downloads!
# aria2c https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2025-10-02/2025-10-01-raspios-trixie-arm64-lite.img.xz
# unxz 2025-10-01-raspios-trixie-arm64-lite.img.xz
#
# qemu-img convert -f raw -O qcow2 2025-10-01-raspios-trixie-arm64-lite.img raspios-lite.qcow2
# qemu-img resize raspios-lite.qcow2 +20G
#
# rm 2025-10-01-raspios-trixie-arm64-lite.img
Use Raspberry Pi Imager to build an image
/bin/qemu-system-arm64 \
-name raspios-lite,process=raspios-lite \
-machine virt,accel=kvm \
# -cpu cortex-a72 \
-cpu max \
-smp cores=3 \
-m 4G \
-device virtio-balloon \
-pidfile raspios-lite.pid \
-rtc base=utc,clock=host \
@chapmanjacobd
chapmanjacobd / alpine_on_pi.qemu
Created October 23, 2025 18:59
alpine arm64 qemu/kvm
/bin/qemu-system-arm64 \
-name alpine-v3.22,process=alpine-v3.22 \
-machine virt,accel=kvm \
-cpu max \
-smp cores=3 \
-m 4G \
# -boot d
-device virtio-balloon \
-pidfile alpine-v3.22.pid \
-rtc base=utc,clock=host \
https://cwa.omg.lol
https://adriannasvitak.com
https://albertocinco.com
http://iamnotana.com
http://experiment-now.de/corporate-life
https://aleesteele.com
https://april.wiki
https://aram.sh
https://asandei.com
https://carolwightman.com