Skip to content

Instantly share code, notes, and snippets.

View devstuff's full-sized avatar

John Bates devstuff

View GitHub Profile
#!/usr/bin/env python3
"""
OKdo LiDAR HAT (LD06) - Fullscreen OpenCV live view.
Press 'q' or Escape to quit.
"""
import sys
import struct
import numpy as np

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@anvarazizov
anvarazizov / listener_public.py
Last active February 27, 2026 04:17
listener_public.py
"""Meshtastic LoRa Listener — Off-Grid AI with Tool Calling
full repo link: https://github.com/anvarazizov/meshtastic-listener-ollama
Architecture:
phi4-mini = smart router (decides which tool to call)
gemma3:12b = knowledge brain (for general Q&A)
HA API = home automation (sensors, device control)
Radio = LoRa mesh I/O
Flow:
@anecdata
anecdata / interfaces.txt
Last active July 29, 2025 18:40
CircuitPython data communication interfaces
EOM
@todbot
todbot / cirpy-showpins.py
Last active July 30, 2025 11:25
Find the defined board.* pins for a CircuitPython board, given a repo directory
#!/usr/bin/env python3
# Find all the defined pins for a CircuitPython board
# 5 Jul 2025 - @todbot / Tod Kurt
# e.g. "cirpy-showpins.py qtpy_m0 ~/projects/adafruit/circuitpython"
# Note: you need a checkout of the CircuitPython github repo for this tool to work
# e.g. "mkdir -f ~/projects/adafruit && cd ~/projects/adafruit && git checkout https://github.com/adafruit/circuitpython/"
import os, sys, re
if len(sys.argv) <= 1:
@kaczmar2
kaczmar2 / 1-pihole-v6-self-signed-certs.md
Last active March 26, 2026 22:56
Pi-hole v6: Creating Your Own Self-Signed SSL Certificates

Pi-hole v6: Creating Your Own Self-Signed SSL Certificates

See my other guides for SSL certificates on Pi-hole v6:

Overview

Pi-hole v6 introduces changes to its web server:

  • Embedded Web Server – Pi-hole no longer relies on lighttpd.
@DeflateAwning
DeflateAwning / RP2040-Zero with MicroPython Setup Guide.md
Last active March 17, 2026 23:26
RP2040-Zero with MicroPython Setup Guide

RP2040-Zero with MicroPython Setup Guide

Initial Setup (Do Once)

  1. Install VS Code.
  2. In VS Code, install the "MicroPico" extension.
  3. Download the MicroPython firmware from: https://micropython.org/download/RPI_PICO/RPI_PICO-latest.uf2
  4. Connect the RP2040-Zero to the computer. If a USB Drive doesn't appear, press: reset-down, boot-down, reset-up, boot-up.
  5. Open the USB Drive that appeared. Copy on the MicroPython uf2 file. Wait 30 seconds.
  6. Optional: Run pip install micropython-rp2-rpi_pico-stubs to install Python type checking helpers.
  • This install the type hints required for the import machine package.
@MichaelThomasMPT
MichaelThomasMPT / todo-list-transfer.yaml
Created May 31, 2024 12:23
A script and a couple of automations to allow Home Assistant to transfer todo/shopping list items from one list to another (eg. Google Keep to Todoist)
script:
  todo_list_move_incomplete_items:
    fields:
      source_list:
        description: "Source list to copy from"
      dest_list:
        description: "Destination list to copy to"
      subtext:
        description: "The non-title text to add to the items"
      due_today:
@Blackshome
Blackshome / appliance-notifications.yaml
Last active April 15, 2026 20:42
appliance-notifications.yaml
blueprint:
name: Appliance Notifications & Actions
description: >
# 📳 Appliance Notifications & Actions
**Version: 4.0**
🤔 Watts your appliance up to, you're always in the know from start to finish! 🛎️🔌💸
@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active April 18, 2026 22:44
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.01)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector: