Skip to content

Instantly share code, notes, and snippets.

View rheckart's full-sized avatar

Rob Heckart rheckart

View GitHub Profile
@rheckart
rheckart / freshrss_fetch.py
Last active April 8, 2026 01:06
FreshRSS feed fetcher for Hermes
#!/usr/bin/env python3
"""
FreshRSS feed fetcher — safe to run via `tirith run <url>`.
Fetches articles from FreshRSS and prints them grouped by category.
Usage:
python3 freshrss_fetch.py [hours] [category ...]
python3 freshrss_fetch.py 24 "AI" "Technology"
python3 freshrss_fetch.py # defaults: last 24h, all categories
"""
@rheckart
rheckart / ApiDbInitializer.cs
Last active May 27, 2024 17:03
Conduct EF Core data migrations every time the Aspire AppHost is run
using System.Diagnostics;
using YourApp.Users;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using OpenTelemetry.Trace;
namespace YourApp.MigrationService;
public class ApiDbInitializer(
@rheckart
rheckart / TelegramAuthMiddleware.cs
Created January 27, 2024 14:59
C# ASP.NET Middleware Code to Authenticate Telegram initData
using Microsoft.Extensions.Primitives;
using System.Security.Cryptography;
using System.Text;
using System.Web;
using System.Text.Json;
using System.Net;
using Telegram.Bot.Types;
namespace AnimalTrackz.API.Middleware
{