Skip to content

Instantly share code, notes, and snippets.

View seancrites's full-sized avatar

Sean Crites seancrites

  • Alaska Communications
  • Anchorage, Alaska
  • 06:39 (UTC -08:00)
  • LinkedIn in/seancrites
View GitHub Profile
@seancrites
seancrites / 4button_scene_switch_zha.yaml
Last active January 17, 2026 21:29 — forked from wujku/4button_scene_switch_zha.yaml
Blueprint for 4-Button Scene Switch (TS0044) – Home Assistant – Improved version of https://community.home-assistant.io/t/zha-tuya-4-button-scene-switch-ts0044/265099
# Modified to support ZGMISmart ZMR4
# Manufacturer: _TZ3000_xwuveizv
# Model: TS0044
blueprint:
name: ZHA - 4-Button Scene Switch
description: Automate your 4-Button Scene Switch via ZHA events.
domain: automation
input:
4button_scene_switch:
name: 4-Button Scene Switch
@seancrites
seancrites / firefox_via_apt.md
Last active March 19, 2026 02:57 — forked from jfeilbach/firefox_snap.md
Debian/Ubuntu 24.04+ remove Firefox snap and install Mozilla .deb version

Debian/Ubuntu 24.04+ Firefox snap replacement

Why?

  1. Better Integration with System

    • Apt: Firefox installed via apt integrates seamlessly with Debian/Lubuntu’s native theming, fonts, and desktop environment (e.g., LXQt for Lubuntu). It respects system-wide settings for GTK themes and file associations.
    • Snap: Snap’s sandboxing can cause inconsistencies, like mismatched themes or issues with file dialogs, as it uses its own libraries. This can feel clunky in lightweight environments like Lubuntu.
  2. Faster Startup and Performance

@seancrites
seancrites / var_debug.md
Created June 10, 2025 00:15
var_debug: POSIX Shell Function for Debugging Variables

var_debug: A POSIX Shell Function for Debugging Variable Values

This Gist provides a POSIX-compliant shell function, var_debug, designed to simplify debugging variable values in shell scripts. It logs variable names and their values with an optional custom prefix, integrating seamlessly with a log_msg function for consistent logging. The function is particularly useful in complex scripts where tracing variable states is critical for debugging.

Features

  • Variable Logging: Logs multiple variables in the format <prefix> <var_name>: <var_value>.
  • Optional Prefix: Supports a custom prefix (e.g., INFO:, DEV:), defaulting to DEV:.
  • Unset Variable Handling: Logs unset for undefined variables.
  • POSIX Compliance: Works in any POSIX sh environment, avoiding non-standard features.
  • Integration: Relies on log_msg for logging to stdout and/or a file.