Skip to content

Instantly share code, notes, and snippets.

View pyrodex's full-sized avatar

Rick Sanchez pyrodex

  • USA
  • 16:25 (UTC -04:00)
View GitHub Profile
@pyrodex
pyrodex / frigate-space.sh
Last active April 7, 2025 13:58
Script to report on Frigate usage by camera and/or date
#!/bin/bash
usage() {
echo "Usage: $0 -d YYYY-MM-DD [-c CAMERANAME] [-C]"
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"
echo ""
echo "-d and -c can be used together"
echo "-d and -C can be used together"
@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