Skip to content

Instantly share code, notes, and snippets.

View lbussell's full-sized avatar

Logan Bussell lbussell

View GitHub Profile
@lbussell
lbussell / HelloWorld.cs
Created July 23, 2025 18:37
test for "dotnet run file.cs"
Console.WriteLine("Hello world!");
@lbussell
lbussell / prompt.txt
Created June 3, 2025 20:26
VS Code GitHub Copilot system prompt
System prompt:
Follow Microsoft content policies.
Avoid content that violates copyrights.
If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with \"Sorry, I can't assist with that.\"
Keep your answers short and impersonal.
Use Markdown formatting in your answers.
Make sure to include the programming language name at the start of the Markdown code blocks.
Avoid wrapping the whole response in triple backticks.
@lbussell
lbussell / Program.cs
Created May 29, 2025 21:13
Analyze dotnet containers build output
var lines = File.ReadAllLines("your raw pipeline output.txt");
// The file contains lots of lines, but we care about lines of the form:
//
// -- EXECUTING: docker info
// a bunch of other lines...
// commmand output, etc...
// -- EXECUTION ELAPSED TIME: 00:00:00.0179437
//
// We want to extract the command and the elapsed time from each of these pairings.
@lbussell
lbussell / Program.cs
Last active May 13, 2025 21:59
Demo using playwright to pull download links from Microsoft Update Catalog
/*
Usage
Install playwright browsers:
dotnet build
pwsh bin/Debug/netX/playwright.ps1 install
Run the app:
dotnet run -- --kb kb5054693
*/
@lbussell
lbussell / chisel-wrapper-dpkg-status-diff.patch
Created February 25, 2025 22:36
Testing chisel-wrapper update for merging dpkg status
diff --git old new
index a3d25da1c..19d431479 100644
--- old
+++ new
@@ -1,353 +1,249 @@
-Package: base-files
-Version: 13ubuntu10.1
-Architecture: amd64
-Essential: yes
-Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
@lbussell
lbussell / 1-chisel-install-additional-slices.Dockerfile
Last active January 30, 2025 17:37
Install additional slices on Ubuntu Chisel base image
ARG CHISEL_VERSION=1.1.0
ARG DOTNET_DOCKER_COMMIT=cb2823a1d974bd0d1d0c513e8f7ace29b2b0d22c
ARG TARGETARCH
# chisel uses chisel to create a new base image
FROM amd64/buildpack-deps:noble-curl AS chisel
ARG CHISEL_VERSION
RUN apt-get update && apt-get install -y file
RUN chisel_url=https://github.com/canonical/chisel/releases/download/v${CHISEL_VERSION}/chisel_v${CHISEL_VERSION}_linux_amd64.tar.gz \
@lbussell
lbussell / _description.md
Last active January 23, 2025 22:24
.NET Tags table formatting

Here are three options for Windows tags table formatting. There are no changes to Linux tags in any of the options. There are some Linux tags shown in Option 1 just so you can compare what they look like to the Windows tags.

Option 1:

  • Windows tags grouped by OS version and architecture (keep in mind we only have one Windows architecture at the moment).
  • Windows .NET preview tags are inline with each Windows version's tags table.

Option 2:

  • Windows tags grouped by OS version and architecture.
  • Windows .NET preview tags are in a separate table.
FROM scratch AS program
COPY <<EOF /Program.cs
using System;
using static System.Console;
// foreach (TimeZoneInfo z in TimeZoneInfo.GetSystemTimeZones())
// {
// WriteLine(z.Id);
// }
TimeZoneInfo z1 = TimeZoneInfo.FindSystemTimeZoneById("Europe/Kyiv");
WriteLine(z1.Id);
@lbussell
lbussell / Dockerfile
Last active April 23, 2024 18:31
Noble Arm32 cert issue repro
# Installer image
FROM arm32v7/buildpack-deps:jammy-curl AS installer
# Install .NET SDK
RUN curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.204/dotnet-sdk-8.0.204-linux-arm.tar.gz \
&& mkdir -p /usr/share/dotnet \
&& tar -oxzf dotnet.tar.gz -C /usr/share/dotnet \
&& rm dotnet.tar.gz
#!/usr/bin/env pwsh
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]$buildId
)
$configPath = "$PSScriptRoot/config.json";
$setVersionsScript = "$PSScriptRoot/Set-DotnetVersions.ps1"