Skip to content

Instantly share code, notes, and snippets.

View seancrites's full-sized avatar

Sean Crites seancrites

  • Alaska Communications
  • Anchorage, Alaska
  • 20:16 (UTC -08:00)
  • LinkedIn in/seancrites
View GitHub Profile
@seancrites
seancrites / firefox_via_apt.md
Last active July 15, 2025 16:19 — 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.