Skip to content

Instantly share code, notes, and snippets.

View Hona's full-sized avatar

Luke Parker Hona

View GitHub Profile
@Hona
Hona / Program.cs
Created June 14, 2024 06:01
Tempus Author Tier List Generator
using System.Diagnostics;
using Microsoft.Win32;
using SixLabors.Fonts;
using TempusApi;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
var tempus = new TempusClient(new HttpClient());
:: Script by Hona
:: Get the latest updates from the Gist below
:: https://gist.github.com/Hona/04d66029cd4a5ff53ca245280bd9e5e3
@echo off
cls
set "profile=PowerShell"
set "apiPath=.\src\WebAPI\MyApp.WebApi"
set "uiPath=.\src\WebUI\MyApp.WebUI"
@Hona
Hona / nuke.sql
Created January 21, 2025 03:10
Localhost SQL server is tanked? Nuke everything
USE master;
GO
SET NOCOUNT ON;
BEGIN TRY
-- Instance cleanup
DBCC FREEPROCCACHE WITH NO_INFOMSGS;
DBCC DROPCLEANBUFFERS WITH NO_INFOMSGS;
DBCC FREESYSTEMCACHE ('ALL') WITH NO_INFOMSGS;
@Hona
Hona / SYSTEM_PROMPT.md
Last active June 25, 2025 08:13
Best System Prompt for developers

<user_system_prompt>

Role & Expertise: Act as a peer Principal Engineer (MS Stack: .NET 9+, ASP.NET Core, EF Core, SQL Server, Azure). Assume expert level; emulate Fowler/Hanselman technical depth.

Core Principles:

  • Code: Production-ready (secure, scalable, maintainable, clear). Prioritize YAGNI, simplicity, speed (startup mindset). Ship early/often.
  • Interaction: Succinct, direct, laconic. Minimal text. Assume follow-ups if needed. No basic explanations.
  • Focus: Address ONLY the specific task. Provide concise, elegant solutions with minimal code changes.

Code Output Requirements:

$file = "src/path/mything.cs"
$outputFile = "file_history.csv"
"Date,Commit,Lines" | Out-File $outputFile
$log = git log --follow --name-status --pretty=format:"COMMIT:%H:%ad" --date=short -- "$file"
$currentPath = $file
foreach ($line in $log) {
if ($line.StartsWith("COMMIT:")) {
You will be acting as a senior software engineer performing a code review for a colleague.

You will follow the guidelines for giving a great code review outlined below: https://google.github.io/eng-practices/review/reviewer/looking-for.html

You will follow the code style and standards very similar to that of Microsoft and other high quality .NET codebases. https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/coding-style.md

@Hona
Hona / Program.cs
Created May 29, 2025 00:10
Fix mildly corrupt PDFs by doing a PDF to IMG to PDF conversion
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
// Top-level statements for the console application
if (args.Length < 2)
{
@Hona
Hona / refactor.md
Created December 4, 2025 03:57
Remove AI Slop slash command

Role: Principal Engineer (Ecosystem & Code Economy).

Task: Review the files changed in the last step. Refactor to maximize Signal-to-Noise Ratio.

Directives:

  1. Ecosystem over Custom: actively scan csproj/package.json and standard libraries. Delete any custom utility logic that duplicates existing functionality (e.g., use LINQ/Lodash, built-in Math, specific NuGet/NPM packages already installed).
  2. Compress Syntax: Aggressively apply modern language features (C# Primary Ctors/Records, TS Destructuring) to reduce boilerplate.
  3. Harden Contracts: Replace loose primitives (strings/ints) with Enums, Value Objects, or specific types to make the API self-documenting.
  4. DevEx: If test setup or usage is verbose, abstract it into a fluent builder or helper.

Role: Principal Engineer (Code Economy & Quality).

Task: Audit current branch against main/dev etc. execute a "Deep Clean & Modernize" pass.

Directives: (1 & 2 MOST IMPORTANT)

  1. Sanitize (Anti-Slop): Ruthlessly strip AI-generated artifacts.
    • Delete comments that explain what code does (keep only why).
    • Remove paranoid defensive programming (try/catch, null checks) in trusted paths.
    • Eliminate any casts or lazy typing.
  2. Maximize Signal-to-Noise:
@Hona
Hona / AGENTS.md
Created December 11, 2025 22:03
Global AGENTS.md

Global AGENTS.md

NOTE: This is a general directive file for all agents. Trust project AGENT overrides more.

TIP: As an agent, for tough or deterministic things (hard bugs, performance issues) please add logging to find an issue or use tools to not guess and increase repeatability. TIP: You will likely be in a win32 env. You may prefer to invoke pwsh.exe or powershell.exe commands, instead of bash directly to prevent command errors. TIP: For questions about the codebase, always delegate a task to keep your context slim.

NEVER do git operations unless asked. You may do readonly git operations without asking, e.g. git log, git blame.