Skip to content

Instantly share code, notes, and snippets.

View timheuer's full-sized avatar
🚴‍♂️
https://twitter.com/timheuer

Tim Heuer timheuer

🚴‍♂️
https://twitter.com/timheuer
View GitHub Profile
@timheuer
timheuer / mcp-server-config.json
Last active April 17, 2025 20:57
MCP Server Config JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/mcp-config-0.1.0.json",
"title": "MCP Servers Configuration",
"description": "Configuration schema for MCP (Model Context Protocol) servers",
"type": "object",
"required": ["servers"],
"additionalProperties": true,
"properties": {
"inputs": {
@timheuer
timheuer / copilot-instructions.md
Created April 10, 2025 23:58
copilot-instructions for C#

GitHub Copilot Instructions

Prefer C# 12 and 13 Language Features

Primary Constructors

Use primary constructors to simplify your class and struct definitions.

public class Person(string name, int age) {
    public void Deconstruct(out string name, out int age) => (name, age) = (this.name, this.age);
@timheuer
timheuer / .filenesting.json
Created March 26, 2025 05:00
file nesting rules for vs
{
"root":true,
"dependentFileProviders":{
"add":{
"addedExtension":{},
"pathSegment":{"add":{".*":[".js",".css",".html",".htm",".less",".scss",".coffee",".iced",".config",".cs",".vb",".json"]}},
"extensionToExtension":{
"add":{
".js":[".coffee",".iced",".ts",".tsx",".jsx"],
".css":[".less",".scss",".sass",".styl"],
@timheuer
timheuer / consoleoutput.md
Created March 7, 2025 16:38
Default console output

Console Output

There are 3 ways console output can be displayed in VS Code. These are explained here: https://code.visualstudio.com/docs/csharp/debugger-settings#_console-terminal-window

Below are example outputs using a standard .NET Console app with some Hello World WriteLine statements and ending in a ReadLine

What do you like and want to be the default.

integratedConsole (current default)

Uses the Debug Console in VS Code

@timheuer
timheuer / devcontainer.json
Created February 13, 2025 18:56
.NET 10 Devcontainer
{
"name": ".NET 10 SDK",
"image": "mcr.microsoft.com/dotnet/nightly/sdk:10.0-preview",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/azure/azure-dev/azd:0": {
@timheuer
timheuer / whoport.ps1
Created August 23, 2024 23:54
find the process info for who is owning a port
# Find out what is running on a port
# used like `whoport 22112`
function whoport
{
param
(
[int] $port
)
Get-Process -Id (Get-NetTCPConnection -LocalPort $port).OwningProcess
}
@timheuer
timheuer / devcontainer.json
Created August 20, 2024 21:09
devcontainer-net9
{
"name": ".NET 9 SDK",
"image": "mcr.microsoft.com/dotnet/sdk:9.0-preview",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/azure/azure-dev/azd:0": {
env CHANNEL='development' COMMIT='$( git rev-parse --short HEAD )' DIST_DIR='dist' GO="${GO:-go}" GOAMD64="v1" GOPROXY='https://goproxy.cn|https://proxy.golang.org|direct' GOSUMDB='sum.golang.google.cn' GOTOOLCHAIN='go1.22.4' GPG_KEY='[email protected]' GPG_KEY_PASSPHRASE='not-a-real-password' PATH="${PWD}/bin:$( "${GO:-go}" env GOPATH )/bin:${PATH}" RACE='0' SIGN='1' NEXTAPI='0' VERBOSE="${VERBOSE:-0}" VERSION='v0.0.0' "/bin/sh" ./scripts/make/go-deps.sh
: not foundake/go-deps.sh: 2:
: not foundake/go-deps.sh: 7:
: bad variable nameeps.sh: 9: readonly: verbose
make: *** [Makefile:106: go-deps] Error 2
@timheuer
timheuer / license-exp.md
Last active May 11, 2024 23:13
SimplifiedLicenseTerms

This is a brief explainer on the usage rights portion of the C# Dev Kit license terms. This is not the full license and you should read at https://marketplace.visualstudio.com/items/ms-dotnettools.csdevkit/license for the complete legal terms and conditions.

Usage License Provided Cost
Personal projects Community Free
OSS projects Community Free
Education (student/teacher/researcher) Community Free
Using in a DevBox Community Free
Using in Codespaces Community Free
Business (< $1M Revenue && < 250 users) Community Free up to 5 devs
@timheuer
timheuer / healthchecks-aspire.css
Created March 30, 2024 07:10
Branding for HealthChecksUI Aspire style
:root {
--primaryColor: #512bd4;
--secondaryColor: #f4f4f4;
--bgMenuActive: #7b4aff;
--bgButton: var(--primaryColor);
--logoImageUrl: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8cGF0aCBkPSJNMjggMjQwQzEyLjU2IDI0MCAwIDIyNy40NCAwIDIxMkMwIDIwNi45NjggMS4zMjggMjAyLjA3MiAzLjg0IDE5Ny44MzJMNzAuNTQ0IDgyLjI5Nkw3MC44MTYgODEuODg4TDEwMy43NDQgMjQuNzkyQzEwOC43NDQgMTYuMTUyIDExOC4wMzIgMTAuNzkyIDEyOCAxMC43OTJDMTM3Ljk2OCAxMC43OTIgMTQ3LjI1NiAxNi4xNTIgMTUyLjI0OCAyNC43ODRMMjUyLjI0OCAxOTcuOTkyQzI1NC42NjQgMjAyLjA2NCAyNTUuOTkyIDIwNi45NiAyNTUuOTkyIDIxMS45OTJDMjU1Ljk5MiAyMjcuNDMyIDI0My40MzIgMjM5Ljk5MiAyMjcuOTkyIDIzOS45OTJMMjggMjQwWiIgZmlsbD0iIzUxMkJENCIvPg0KPHBhdGggZD0iTTIwMi42NCAxNDRIMTM1LjkyTDEyOCAxMzAuMjRMMTA1LjA0IDkwLjQ4QzEwNCA4OC43MiAxMDIuNTYgODcuMiAxMDAuNjQgODYuMTZDOTQuOTYgODIuOCA4Ny42IDg0LjggODQuMjQgOTAuNTZMMTE3LjYgMzIuOEMxMTkuNjggMjkuMiAxMjMuNTIgMjYuOCAxMjggMjYuOEMxMzIuNDggMjYuOCAxMzYuMzI