Skip to content

Instantly share code, notes, and snippets.

View devstuff's full-sized avatar

John Bates devstuff

View GitHub Profile
@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 July 30, 2025 00:57
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 August 14, 2025 22:55
RP2040-Zero with MicroPython Setup Guide

RP2040-Zero with MicroPython Setup Guide

  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. Use Device Manager (or SerialTest) to see that a new USB Serial Device appeared.
  7. In VS Code with MicroPython, see that it's connected (see the status bar at the very bottom).
  8. Optional: Run pip install micropython-rp2-rpi_pico-stubs to install Python type checking helpers.
@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:
@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active September 3, 2025 17:42
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.0)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@vkz
vkz / hoot.md
Last active August 19, 2025 18:21
Tailscale your AWS and on-prem resources: have your cake and eat it too

Tailscaling git.ht

This [hoot][] you're about to read started its life as a gist of technical minutae I had to discover to Tailscale cloud and on-prem resources. It'd be too boring for me to just publish it, so I thought I'd give a little bit of context as a preamble. I get to rant some and you can simply skip to the technical sections below if you'd rather not indulge me.

Ranty preamble

How much of what AWS gives you do you really truly need? It's become Kubernetes this, Docker that. I rarely question it when contracting because contractors usually arrive after the fact to pick up and carry the pieces. You get to target the infrastructure that may as well have been installed by alients before humankind ascended in Amazon. All in the cloud, can't touch, jumpbox this, terraform that, re-create the world every time you sneeze, etc. It's different when you're hired fo

@mcauser
mcauser / au915_vs_as923.md
Last active April 22, 2025 00:45
AU915 vs AS923
@Tahutipai
Tahutipai / report_zigbee_zwave_devices_gone_offline.yaml Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Report offline zigbee/zwave/battery/smart plug devices
description: Works with Smart Plugs, ZWave, Zigbee etc (Works with ZHA & Z2M)
#By Tahutipai 2024-02-21
#Originally Based on the work of Sybx @ https://community.home-assistant.io/t/low-battery-level-detection-notification-for-all-battery-sensors/258664
#Note: This has been upgraded to report only the Device that is offline, not multiple individual sensors within one Device
domain: automation
input:
time:
name: Time to test on
@flaki
flaki / docker-to-proxmox.md
Created February 7, 2023 21:36
Importing a Docker container image into Proxmox Linux Containers (LXC)

Importing a Docker container into Proxmox/LXC

Importing the container

For this we are going to be using lxc-create, which comes pre-installed on Proxmox but needs further dependencies to fetch the OCI images from Docker:

apt update && apt -y install skopeo umoci jq