Skip to content

Instantly share code, notes, and snippets.

View VAllens's full-sized avatar
🎯
Focusing

Allen VAllens

🎯
Focusing
View GitHub Profile
namespace AllenCai;
/// <summary>
/// This is an imitation of the Microsoft.VisualBasic.CompilerServices.LikeOperator.LikeString method,
/// implementing matching that supports * and ? wildcards and support ignores case rules.<br />
/// The purpose of this implementation is to reduce memory allocation and improve performance.
/// </summary>
public static class ZeroMemAllocLikeOperator
{
/// <summary>
@VAllens
VAllens / Three-ways-get-installed-.NET-Runtimes.md
Last active June 13, 2024 01:12
Three ways to get a list of installed .NET runtimes on your local computer/server
  1. Using terminal command
dotnet --list-runtimes
  1. Using C#/CSharp code
@nicolaskopp
nicolaskopp / killDocker.md
Last active July 24, 2024 07:34
How to delete `C:\ProgramData\Docker` and fixing "Access denied" errors

How to delete C:\ProgramData\Docker and fixing "Access denied" errors

Still an issue in July 2024. Welcome to the future of web development. Take this Gist to rest and calm down.

Here is how to delete C:\ProgramData\Docker.

  1. Uninstall docker the normal way (yeah you may have already done that)
  2. Copy this:
@dasMulli
dasMulli / Directory.Build.targets
Last active December 30, 2023 19:48
PublishAll target to publish for all frameworks and runtimes
<Project>
<Target Name="PublishProjectIfFrameworkSet"
DependsOnTargets="Publish"
Condition=" '$(TargetFramework)' != '' " />
<Target Name="PublishProjectForAllRIDsIfTargetFrameworkSet" Condition=" '$(TargetFramework)' != '' and '$(RuntimeIdentifiers)' != '' and '$(RuntimeIdentifier)' == '' ">
<ItemGroup>
<_PublishRuntimeIdentifier Include="$(RuntimeIdentifiers)" />
</ItemGroup>
<MSBuild Projects="$(MSBuildProjectFile)" Targets="PublishAll" Properties="TargetFramework=$(TargetFramework);RuntimeIdentifier=%(_PublishRuntimeIdentifier.Identity)" />