Skip to content

Instantly share code, notes, and snippets.

View cgons's full-sized avatar

Chrys Gonsalves cgons

  • Toronto
  • 13:15 (UTC -05:00)
View GitHub Profile
@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 April 9, 2025 22:58
Python Dev Setup for (M1) Macs