Example of setting up Grafana to read from Firefly. See https://www.reddit.com/r/FireflyIII/comments/nogrl5 for context.
| import serial | |
| import io | |
| import struct | |
| from adafruit_debouncer import Debouncer | |
| PORT = "COM7" # update me to match your setup! | |
| BUTTON_0_MASK = 0b000000000010000 | |
| BUTTON_1_MASK = 0b000000100000000 | |
| BUTTON_2_MASK = 0b000001000000000 |
Your private keys stay on the Mac, or on your YubiKey, and gpg on the Linux host uses them over SSH.
Last tested in October 2026 from macOS with GnuPG 2.5.24 and OpenSSH 10.5 to Debian 13 with GnuPG 2.4.7 and OpenSSH 10.0. You need GnuPG 2.1.17 or newer on both ends and OpenSSH 6.7 or newer.
Install GnuPG and a graphical pinentry. Passphrase and PIN prompts appear on the Mac, so a terminal pinentry won't work for a request that comes from the remote host.
Side note: The latest edge build of KeeAgent plugin offers an option for creating a WSL compatible socket. This would be very handy. I already tried to use that socket, but the socket file is currently empty and ssh inside WSL 2 is unable to use it. This appears to be a very new, unreleased and unstable feature. I will follow the development of it and when it finally works (well, for me) I will update this HOWTO. But until then, please use the proven wsl-ssh-agent/npiperelay.exe approach below.
Thanks to the instructions for WSL 2 of the wsl-ssh-agent project, KeeAgent works great in WSL 2 now:
https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatibility
The approach uses minimal and well-maintained tools.
- 14.08.2025: Improve: Improve title of this gist.
| #!/usr/bin/env bash | |
| # --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\ | |
| function register_clang_version { | |
| local version=$1 | |
| local priority=$2 | |
| update-alternatives \ | |
| --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \ |
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
| # Detect operating system in Makefile. | |
| # Author: He Tao | |
| # Date: 2015-05-30 | |
| OSFLAG := | |
| ifeq ($(OS),Windows_NT) | |
| OSFLAG += -D WIN32 | |
| ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) | |
| OSFLAG += -D AMD64 | |
| endif |