Skip to content

Instantly share code, notes, and snippets.

View danielrosehill's full-sized avatar

Daniel Rosehill danielrosehill

View GitHub Profile

Text Transformation Prompts

Short system prompts for transforming dictated text (usually processed by OpenAI Whisper) into specific formats and styles and for various purposes.

Date

Timestampped export on May 30, 2025

Creation

Using Neo NAS-AB02B0 Zigbee Sirens with Custom MQTT Payloads in Home Assistant

If you're using the Neo NAS-AB02B0 Zigbee sirens (or similar models like NAS-AB02B2) in Home Assistant via Zigbee2MQTT, you might have noticed that the native siren entity in Home Assistant only exposes basic on/off functionality. This limits you to a single, static melody that plays whenever the siren is triggered.

However, by publishing directly to the device's MQTT topic, you can unlock the full functionality of the siren โ€” including selecting melodies dynamically, adjusting volume, and setting play duration.

This allows you to use the same siren for multiple distinct purposes: a doorbell chime, an alarm, or a timed alert โ€” simply by sending a different payload.


Alerting Cadence

This document outlines a clean alerting flow for routing notifications from systems to humans. It defines the standard alerting cadence used in professional environments and presents two examples: one SaaS-based using PagerDuty, and one self-hosted using n8n and Pushover.


๐Ÿ“ Conceptual Sequence

Cloudflare Docker Compose With Specified DNS

When This Might Be Necessary

In setups where your containerized environment is behind:

  • OPNsense as the network firewall/router
  • cloudflared as a DNS forwarder (e.g., for DoH/DoT)

You may encounter repeated tunnel crashes with errors like:

Is It Yom Tov? (Binary Sensor Downstream Of Jewish Sabbath Holidays Home Assistant Integration)

This template binary sensor provides a binary condition for the isYomtiv sensor in the Jewish Sabbath Holidays Home Assistant plugin which reports either No Info (false) or the Yom Tov name (true).

To simplify using this sensor in automations, this template sensor converts it to a binary based on simple logic interpretation.

Description

Template binary sensor for Yomtov detection in Home Assistant using sensor.hebcal_is_yomtov from rt400/Jewish-Sabbaths-Holidays

Combined Shabbat or Yom Tov Binary Sensor for Home Assistant

This example uses the Jewish Sabbaths & Holidays integration by rt400, which provides a variety of sensors including:

  • sensor.hebcal_is_shabbat โ€” returns 'True' if it's currently Shabbat, otherwise 'False'
  • sensor.hebcal_is_yomtov โ€” returns 'No Info' if it's not Yom Tov, otherwise a string with the holiday name

If you want to drive automations based on either Shabbat or Yom Tov, you can create a combined binary sensor using a template sensor.


@danielrosehill
danielrosehill / yadm-autopush-setup.md
Created May 10, 2025 20:10
Setting up auto-pushes for YADM

YADM Repo Auto-push

This Gist includes:

  1. yadm-autopush.sh: A script that stages and commits tracked changes in your dotfiles and pushes them to your remote repository.

  2. yadm-autopush.service: A systemd user service that executes the yadm-autopush.sh script.

  3. yadm-autopush.timer: A systemd user timer that triggers the service every 6 hours, starting 5 minutes after boot.

@danielrosehill
danielrosehill / improving-voice-input-ubuntu.md
Created May 9, 2025 21:46
Improving voice input quality on Ubuntu for STT / dictation

Voice Recognition Enhancement on Linux (Ubuntu)

This guide explains how to improve voice recognition and speech-to-text accuracy on Linux (specifically Ubuntu) by enhancing your microphone input using EasyEffects and PipeWire.

Rationale

Voice recognition accuracy heavily depends on the quality of the microphone and the clarity of the audio signal. While investing in a high-quality microphone is a great start, software processing can further enhance signal quality. By routing microphone input through EasyEffects, you can apply advanced audio processing such as noise reduction, automatic gain control (AGC), and voice detection, resulting in a cleaner, more consistent signal for speech recognition tools.

Prerequisites

@danielrosehill
danielrosehill / easy-effects-sources.md
Created May 9, 2025 19:31
EasyEffects Input Source Selection with PipeWire

๐ŸŽ™๏ธ EasyEffects Input Source Selection with PipeWire

Context: In PipeWire-based systems (e.g., Ubuntu 25.04 with KDE), EasyEffects no longer lets you select an input device directly via its GUI.

Instead, it automatically processes whatever the system's default input source is.


โœ… How EasyEffects Chooses Its Input

@danielrosehill
danielrosehill / alerting-zones.md
Created May 9, 2025 15:37
Alerting zones used by Pikud HaOref
  • ื’ืืœื™ื”
  • ืื‘ืŸ ื™ื”ื•ื“ื”
  • ืื•ื“ื™ื
  • ืื•ืจ ื™ื”ื•ื“ื”
  • ืื•ืจื ื™ืช
  • ืื–ื•ืจ
  • ืื–ื•ืจ ืชืขืฉื™ื™ื” ืืคืง ื•ืœื‘ ื”ืืจืฅ
  • ืื–ื•ืจ ืชืขืฉื™ื™ื” ื”ืจ ื˜ื•ื‘ - ืฆืจืขื”
  • ืื–ื•ืจ ืชืขืฉื™ื™ื” ื—ื‘ืœ ืžื•ื“ื™ืขื™ืŸ
  • ืื–ื•ืจ ืชืขืฉื™ื™ื” ื ืฉืจ - ืจืžืœื”