Skip to content

Instantly share code, notes, and snippets.

View cgons's full-sized avatar

Chrys Gonsalves cgons

View GitHub Profile
@cgons
cgons / output.txt
Last active September 23, 2026 01:20
sparkmon - Monitor Core temps. + RAM usage for a 2x DGX Spark cluster.
HOST TEMP MEM USED CAPACITY MEM %
-------- --------- ------------ ------------ ---------
spark1 57.2C° 82.4 GiB 121.7 GiB 68.9%
spark2 54.7C° 76.1 GiB 121.7 GiB 63.6%
@cgons
cgons / m4a-to-mp3.sh
Created January 16, 2026 22:57
M4A to MP3 (for voip.ms voicemail recordings)
#!/bin/bash
# Convert m4a files to MP3 (for VoIP.ms voicemail recordings) via FFmpeg.
# ---
INPUT_FILE="$1"
# Extract filename without extension
BASENAME=$(basename "$INPUT_FILE" .m4a)
OUTPUT_FILE="${BASENAME}.mp3"
@cgons
cgons / python-recipe--log-all-exceptions.md
Created June 26, 2025 18:13
Python Recipe - Log All Exceptions

Python Recipe - Log All Exceptions

import logging
import sys

def handle_unhandled_exception(exc_type, exc_value, exc_traceback):
    if issubclass(exc_type, KeyboardInterrupt):
        # Let KeyboardInterrupt pass through for normal exits
 sys.__excepthook__(exc_type, exc_value, exc_traceback)
@cgons
cgons / mac-setup-for-python.md
Last active February 11, 2026 18:13
Python Dev Setup for (M1) Macs