Skip to content

Instantly share code, notes, and snippets.

View kfrancis's full-sized avatar
😀
Happy to help!

Kori Francis kfrancis

😀
Happy to help!
  • Clinical Support Systems
  • Kingston, Ontario
  • X @djbyter
View GitHub Profile
@kfrancis
kfrancis / EntityCopy.cs
Created November 26, 2024 20:22
Expression/Property fun
public static class EntityCopy
{
public static void UpdateEntity<T>(T source, T destination)
where T : class
{
var properties = PropertyAccessorCache.GetCachedProperties<T>();
foreach (var property in properties.Where(property => property is { CanRead: true, CanWrite: true }))
{
property.SetValue(destination, property.GetValue(source));
}
@kfrancis
kfrancis / manifest.json
Created December 19, 2024 16:53
Repomix Browser Extension
{
"manifest_version": 3,
"name": "Repomix Helper",
"version": "1.0",
"description": "Generate repomix output from GitHub repositories with advanced configuration",
"permissions": [
"activeTab",
"scripting",
"storage"
],
@kfrancis
kfrancis / setup.sh
Created May 21, 2025 23:21
Dotnet GPT Codex setup.sh
#!/bin/bash
# Exit on any error
set -e
# Function to log status with timestamp
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1"
}
@kfrancis
kfrancis / cleanrg.cs
Last active June 17, 2025 23:37 — forked from davidfowl/cleanrg.cs
A C# tool for cleaning up resource groups
// -----------------------------------------------------------------------------
// Azure RG Smart Janitor - Enhanced Cleanup Tool
// Run with: dotnet run smart-cleanup.cs
// Targets: .NET 10 Preview 4+
// -----------------------------------------------------------------------------
#:package Azure.Identity@1.*
#:package Azure.ResourceManager@1.*
#:package Azure.ResourceManager.Compute@1.*
#:package Azure.ResourceManager.Storage@1.*