Skip to content

Instantly share code, notes, and snippets.

View Aaronontheweb's full-sized avatar
🚀
Shipping!

Aaron Stannard Aaronontheweb

🚀
Shipping!
View GitHub Profile
@Aaronontheweb
Aaronontheweb / cursor-rule.md
Created June 18, 2025 15:48
MicrosoftDocs MCP Server System Prompt

Querying Microsoft Documentation

You have access to an MCP server called microsoft.docs.mcp - this tool allows you to search through Microsoft's latest official documentation, and that information might be more detailed or newer than what's in your training data set.

When handling questions around how to work with native Microsoft technologies, such as C#, F#, ASP.NET Core, Microsoft.Extensions, NuGet, Entity Framework, the dotnet runtime - please use this tool for research purposes when dealing with specific / narrowly defined questions that may occur.

@Aaronontheweb
Aaronontheweb / razor.md
Created June 2, 2025 18:47
ASP.NET Core Razor LLM System Prompts

ASP.NET Core MVC + Razor Reusability Guide

Goal Provide a concise, LLM-friendly rule set for building ASP.NET Core MVC pages that stay reusable, testable, and maintainable.


🔑 Guiding Principles

  1. Think in Features, Not Layers – co-locate Controllers, Views, ViewModels, Tag Helpers, and View Components under /Features/<FeatureName>/… so everything a feature needs lives together.
  2. Shape Data Up-Front – perform all heavy lifting (queries, transforms) in services or controllers; Razor files should only render.
@Aaronontheweb
Aaronontheweb / prompt.md
Created June 2, 2025 17:09
Memorizer System Prompt

📚 Agent Memory Protocol

You have a long-term memory service exposed through the MemoryTools MCP interface. Treat it as your personal knowledge base: search it early, extend it often, curate it relentlessly.

1. Retrieve first, think second

  • Before you begin any new task (or new sub-task), call
    MemoryTools.Search( query=<a concise natural-language description of the task>, limit=10, minSimilarity=0.70 ).
  • For each hit, also call MemoryTools.GetMany( ids=<all relationship IDs> ) so you start with the full context graph.
@Aaronontheweb
Aaronontheweb / TcpInstrumentation.cs
Last active April 25, 2025 15:19
.NET OpenTelemetry Metrics for TCP Listeners
// -----------------------------------------------------------------------
// <copyright file="TcpInstrumentation.cs" company="Petabridge, LLC">
// Copyright (C) 2024 - 2024 Petabridge, LLC <https://petabridge.com>
// </copyright>
// -----------------------------------------------------------------------
using System.Net;
using System.Net.NetworkInformation;
using OpenTelemetry.Metrics;
using static OpenTelemetry.TcpInstrumentation.TcpInstrumentationMeter;
@Aaronontheweb
Aaronontheweb / publish_container.yml
Created April 23, 2025 18:57
GitHub Actions `docker compose` Deploy with Tailscale
name: Publish Site to Docker
on:
push:
tags:
- '*'
jobs:
publish-docker:
@Aaronontheweb
Aaronontheweb / program1.fs
Created April 20, 2025 19:14
Falco Static Files
module Program
open Falco
open Falco.Routing
open Microsoft.AspNetCore.Builder
let wapp = WebApplication.Create()
wapp.UseRouting()
.UseDefaultFiles()
@Aaronontheweb
Aaronontheweb / buildwarnings.md
Created March 22, 2025 13:48
Cursor AI prompts for Akka.NET

Akka.NET Build Warning Resolution Procedure

Initial Assessment

  1. Capture full build output:
    dotnet build src/Akka.sln > TestResults/full_build_output.txt
    Use TestResults directory as it's already in .gitignore.

Warning Analysis Checklist

@Aaronontheweb
Aaronontheweb / PlainPartitionedSource.md
Created March 19, 2025 16:40
Akka.Streams.Kafka v1.5.39 Benchmark Results

BenchmarkDotNet v0.14.0, Pop!_OS 22.04 LTS
13th Gen Intel Core i7-1360P, 1 CPU, 16 logical and 12 physical cores
.NET SDK 9.0.100
  [Host]  : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
  LongRun : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2

Job=LongRun  EvaluateOverhead=False  Concurrent=True
Server=True InvocationCount=1 IterationCount=10
@Aaronontheweb
Aaronontheweb / selectasync.linq
Created March 19, 2025 16:06
SelectAsync Akka.NET v1.5.39 Reproduction Attempt
var actorSystem = ActorSystem.Create("Foo");
async Task DoCount(int parallelism, int elements, bool configureAwait)
{
Console.WriteLine($"[{DateTime.UtcNow}] Starting calculation of [{elements}] elements with parallelism [{parallelism}]");
var timer = Stopwatch.StartNew();
var total = await Source.Repeat(1)
.SelectAsync(10, async i =>
{
@Aaronontheweb
Aaronontheweb / PlainPartitionSourceBenchmarks.md
Last active March 18, 2025 13:28
Akka.Streams.Kafka v1.5.39-beta3 benchmark results

BenchmarkDotNet v0.14.0, Pop!_OS 22.04 LTS
13th Gen Intel Core i7-1360P, 1 CPU, 16 logical and 12 physical cores
.NET SDK 9.0.100
  [Host]  : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2
  LongRun : .NET 9.0.0 (9.0.24.52809), X64 RyuJIT AVX2

Job=LongRun  EvaluateOverhead=False  Concurrent=True
Server=True InvocationCount=1 IterationCount=10