Skip to content

Instantly share code, notes, and snippets.

View michaelvolz's full-sized avatar

Michael A. Volz (Flynn) michaelvolz

View GitHub Profile
@kasuken
kasuken / blazor.md
Created May 2, 2025 09:16
Copilot instructions for C#, Blazor and PowerShell

Project coding standards

General C# Coding Standards

  • Use var only when the type is obvious; otherwise, use explicit types.
  • Keep line length under 120 characters.
  • Use consistent indentation and always include braces ({}) even for single-line statements.
  • Group using directives with System.* first, then others in alphabetical order.

Naming Conventions

  • Use PascalCase for component names, classes, methods, and properties.
{
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34bf85}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@shanselman
shanselman / profile.json
Created May 7, 2019 04:22
Windows Terminal Profile
{
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@madskristensen
madskristensen / ETagMiddleware.cs
Last active October 8, 2025 20:16
ASP.NET Core ETAg middleware
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Net.Http.Headers;
using System.IO;
using System.Security.Cryptography;
using System.Threading.Tasks;
public class ETagMiddleware
{
@lukas-h
lukas-h / license-badges.md
Last active December 8, 2025 13:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@madskristensen
madskristensen / devenv.pkgundef
Last active February 21, 2022 13:04
Disable built-in Visual Studio packages
//********************************************************//
// HOW TO:
// Create a file called devenv.pkgundef in the same directory as devenv.exe.
// It's usually located at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
// Then call "devenv.exe /updateconfiguration" from an elevated command prompt.
// REMARKS:
// Each GUID below represent a package that Visual Studio is loading. This is the
// list of package that I personally don't ever use. You can modify the list of
@vkhorikov
vkhorikov / CustomerController.cs
Last active July 27, 2025 13:40
Handling failures and input errors in a functional way
[HttpPost]
public HttpResponseMessage CreateCustomer(string name, string billingInfo)
{
Result<BillingInfo> billingInfoResult = BillingInfo.Create(billingInfo);
Result<CustomerName> customerNameResult = CustomerName.Create(name);
return Result.Combine(billingInfoResult, customerNameResult)
.OnSuccess(() => _paymentGateway.ChargeCommission(billingInfoResult.Value))
.OnSuccess(() => new Customer(customerNameResult.Value))
.OnSuccess(
@davidfowl
davidfowl / dotnetlayout.md
Last active December 10, 2025 11:40
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@reharik
reharik / Autofixture for controller
Last active December 15, 2020 07:58
Autofixture
public class test
{
[Theory, TestData]
public void make_this_populate_a_controller( TestController SUT)
{
var actionResult = SUT.Get("hello");
var x = "";
}
}
@jbogard
jbogard / Featurefolders.cs
Created October 3, 2013 15:55
Feature folders
public class FeatureViewLocationRazorViewEngine : RazorViewEngine
{
public FeatureViewLocationRazorViewEngine()
{
ViewLocationFormats = new[]
{
"~/Features/{1}/{0}.cshtml",
"~/Features/{1}/{0}.vbhtml",
"~/Features/Shared/{0}.cshtml",
"~/Features/Shared/{0}.vbhtml",