Skip to content

Instantly share code, notes, and snippets.

View mogorman's full-sized avatar

Matthew O'Gorman mogorman

View GitHub Profile
@tetele
tetele / README.md
Last active February 27, 2025 09:48
ESPHome config - Raspiaudio Muse Luxe as a voice assistant satellite in Home Assistant

Introduction

The purpose of this ESPHome config is to be able to use the Raspiaudio Muse Luxe as a voice assistant satellite in Home Assistant.

Features

  • wake word, push to talk and continuous conversation support
  • response playback
  • service exposed in HA to start and stop the voice assistant from another device/trigger
  • visual feedback of the recording/success/error status via the Luxe's onboard LED
@alphapapa
alphapapa / fitness.org
Last active February 19, 2025 04:32
An Emacs food/weight/workout tracker self-contained in a single Org file

Plots

/home/me/org/double-plot.png

Tasks

#!/bin/bash
voltage() { cat /sys/class/power_supply/fusb302-typec-source/voltage_now; }
voltage_actual() { cat /sys/class/power_supply/max170xx_battery/voltage_now; }
current_actual() { cat /sys/class/power_supply/max170xx_battery/current_now; }
current() { cat /sys/class/power_supply/fusb302-typec-source/current_max; }
current_limit() { cat /sys/class/power_supply/bq24190-charger/input_current_limit; }
capacity() { cat /sys/class/power_supply/max170xx_battery/capacity; }
breaker() { echo "------------------------------------------------------"; }
echo "Voltage: $(expr `voltage` / 1000000)V DC"
@ladinu
ladinu / encryptedNixos.md
Last active January 2, 2025 15:06
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
{pkgs, lib, ... }:
let
pinRollback = pkgs.writeShellScriptBin "ar-pin-rollback"
''
CURVERSION=$(nix-env --list-generations -p /nix/var/nix/profiles/system | grep -Po '([0-9]+)(?=\s+[0-9 -]+ [0-9 :]+\s*\(current\))')
echo Setting /nix/var/nix/rollback-version to $CURVERSION
echo $CURVERSION > /nix/var/nix/rollback-version