This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Text.Json.Serialization.DataContractExtensions; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Reflection; | |
using System.Runtime.Serialization; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
/// <summary> | |
/// Provides an AOT-compatible extension for <see cref="JsonStringEnumConverter"/> that adds support for <see cref="EnumMemberAttribute"/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin/ | |
obj/ | |
.vs/ | |
.idea/ | |
.vscode/ | |
*.user | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$userPath = $env:USERPROFILE | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
$pathExclusions.Add('C:\Windows\assembly') > $null | |
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null | |
$pathExclusions.Add($userPath + '\.dotnet') > $null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.CompilerServices; | |
using static ParsingExtensions; | |
string input = "Name: Andrew; Age: 31"; | |
string? name = null; | |
int age = 0; | |
if (input.TryParse($"Name: {Placeholder(ref name)}; Age: {Placeholder(ref age)}")) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This goes in your Microsoft.PowerShell_profile.ps1 (can find the path via $PROFILE in your prompt) | |
Import-Module -Name posh-git,oh-my-posh,Terminal-Icons | |
Set-PoshPrompt -Theme craver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
namespace System.Collections.Concurrent | |
{ | |
public static class ConcurrentDictionaryExtensions | |
{ | |
/// <summary> | |
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@if (IsLoading) | |
{ | |
@LoadingTemplate | |
} | |
else | |
{ | |
@ContentTemplate | |
} | |
@code { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco feature enable -n allowGlobalConfirmation | |
choco install notepad2 | |
choco install notepadplusplus | |
choco install 7zip | |
choco install paint.net | |
choco install autoruns | |
choco install vcredist140 | |
choco install dotnetfx |
NewerOlder