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 / 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
@timheuer
timheuer / aspire-manifest-schema.json
Last active February 21, 2024 02:08
aspire-manifest-schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Schema for .NET Aspire Manifest",
"type": "object",
"properties": {
"resources": {
"type": "object",
"description": "A list of the resources",
"patternProperties": {
"^[a-zA-Z0-9]+$": {
@timheuer
timheuer / project.csproj
Created February 16, 2024 05:01
set nbgv before
<Target Name="SetContainerTagTarget" BeforeTargets="CoreCompile">
<PropertyGroup>
<ContainerImageTag>$(GitCommitId)</ContainerImageTag>
</PropertyGroup>
</Target>
@timheuer
timheuer / oidc-config.ps1
Last active April 22, 2024 23:05
Script to execute the full set of instructions to wire up OIDC to a GitHub repo with Azure identities for an Azure App Service deployment
param(
[Parameter(Mandatory = $true, HelpMessage = "Your Azure subscription ID")]
[string]$subscriptionId,
[Parameter(Mandatory = $true, HelpMessage = "The name of the managed identity")]
[string]$managedIdName,
[Parameter(Mandatory = $true, HelpMessage = "The name of the resource group")]
[string]$resourceGroupName,
// Open the file in an editor
if (createdFile) {
vscode.workspace.openTextDocument(createdFile).then((document) => {
vscode.window.showTextDocument(document);
});
}
@timheuer
timheuer / azure-pipelines.yaml
Created November 9, 2023 19:28
dotnet8-azpipeline
# Use .NET 8 SDK
# Ensures .NET 8 SDK is installed/used
- task: UseDotNet@2
inputs:
version: 8.0.x