Skip to content

Instantly share code, notes, and snippets.

View pjmagee's full-sized avatar
🏠
Working from home

Patrick Magee pjmagee

🏠
Working from home
View GitHub Profile

TECH RADAR 2024

My tech radar leaning towards .NET related technologies but not exclusive to .NET

Machine Learning

ML.NET
LMStudio

IaC / GitOps / Orchestration / DevOps

Terraform

@SteveSandersonMS
SteveSandersonMS / BlazorForm.cshtml
Created September 21, 2018 16:29
Validation mockup A: explicit <ValidateXyz> components that take a Func<T>
@* Unfortunately this has to be named BlazorForm, not Form, because we can't differentiate based on casing *@
<form onsubmit=@HandleSubmit>
@ChildContent(_context)
</form>
@functions {
private FormContext _context = new FormContext();
[Parameter] protected RenderFragment<FormContext> ChildContent { get; set; }
[Parameter] protected Action<FormContext> OnSubmit { get; set; }
@pjmagee
pjmagee / God.Extensions.T.cs
Last active September 4, 2018 11:26
Best patterns and practices to using MSharp framework
// Ensure you always use global App namespace for EVERYTHING.
// This means that at runtime, it doesnt need to search inside namespaces and is 4-8x faster.
namespace App
{
// Always use static classes, DI is bad practice and makes everything slow.
// If you MUST use DI, then ensure you use the container everywhere as a service locator so that it's faster.
public static class God
{
[DebuggerHidden] // Hide, we dont want developers finding this and then trying to optimize it further, only chuck norris could do that.