Skip to content

Instantly share code, notes, and snippets.

@pyrodex
pyrodex / lunch.py
Created January 5, 2025 22:38
Simple python code to pull Meal Viewer daily menu and write it to an HTML file
import requests
import json
from datetime import datetime
lunch_file = "/apps/swag/config/www/lunch_entrees.html"
# Get today's date
today = datetime.now()
# Check if it's a weekday (Monday = 0, ..., Friday = 4)
if today.weekday() < 5: # 0 to 4 are weekdays
# Format the date as MM-DD-YYYY
@pyrodex
pyrodex / frigate-space.sh
Last active June 2, 2025 20:27
Script to report on Frigate usage by camera and/or date
#!/bin/bash
set -euo pipefail
usage() {
echo "Usage: $0 [-d YYYY-MM-DD [-c CAMERANAME] [-C]] [-D]"
echo "-d: Date to search in YYYY-MM-DD format"
echo "-c: (Optional) Name of the camera as Frigate knows it"
echo "-C: All cameras (use with -d)"
echo "-D: Show total disk usage per day across all cameras"