I hereby claim:
- I am thoemmi on github.
- I am thoemmi (https://keybase.io/thoemmi) on keybase.
- I have a public key ASD1LqmfVwJ9qgVmFamgIyLV28FTLDOwzDiIph2oyBtA9go
To claim this, I am signing this object:
[CmdletBinding(SupportsShouldProcess=$True)] | |
Param( | |
[int]$CutoffDays = 150 | |
) | |
$cutoffDate = (Get-Date).AddDays(-$CutoffDays) | |
# get path to cached NuGet packages ("%USERPROFILE$\.nuget\packages") | |
$nugetCachePath = Join-Path "$([System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::UserProfile))" ".nuget\packages" |
public class EncryptingJsonConverter : JsonConverter { | |
private readonly byte[] _encryptionKeyBytes; | |
public EncryptingJsonConverter(string encryptionKey) { | |
if (encryptionKey == null) { | |
throw new ArgumentNullException(nameof(encryptionKey)); | |
} | |
// Hash the key to ensure it is exactly 256 bits long, as required by AES-256 | |
using (var sha = new SHA256Managed()) { |
public static class AnsiConsoleExtensions | |
{ | |
public static IAnsiConsole WriteJson(this IAnsiConsole console, JsonElement node, JsonStyle? jsonStyle = null) | |
{ | |
ArgumentNullException.ThrowIfNull(console); | |
ArgumentNullException.ThrowIfNull(node); | |
console.WriteJson(node, jsonStyle ?? JsonStyle.Default, 0); | |
return console; | |
} |
<# | |
.SYNOPSIS | |
Adds an XML fragment to an XmlNode | |
.DESCRIPTION | |
Adds an XML fragment to an XmlNode | |
.NOTES | |
Author : Thomas Freudenberg - info@thomasfreudenberg.com | |
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<UsingTask TaskName="GitVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" > | |
<ParameterGroup> | |
<LocalPath ParameterType="System.String" /> | |
<Path ParameterType="System.String" /> | |
<CommitCount ParameterType="System.Int32" Output="true" /> | |
</ParameterGroup> | |
<Task> |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, HelpMessage="Path to work item template definition file")] | |
[string] | |
$witdPath | |
) | |
# path to dot.exe; e.g. use "choco install graphviz" | |
$dotPath = "C:\ProgramData\chocolatey\bin\dot.exe" |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace SingleThreadedTaskSchedulerDemo { | |
public class SingleThreadedTaskScheduler : TaskScheduler, IDisposable { | |
private readonly string _backgroundThreadName; | |
private readonly object _backgroundThreadLock = new object(); |
I hereby claim:
To claim this, I am signing this object:
public class EnumFlagsConverter : JsonConverter | |
{ | |
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | |
{ | |
var x = ((Enum) value).ToString(); | |
var list = new List<string>(); | |
foreach (var v in x.Split(new[] {", "}, StringSplitOptions.RemoveEmptyEntries)) | |
{ | |
list.Add(v); |
<?xml version="1.0" encoding="utf-8" ?> | |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<!-- | |
Originally written by Daniel Chambers (http://www.digitallycreated.net) | |
http://www.digitallycreated.net/Blog/61/combining-multiple-assemblies-into-a-single-exe-for-a-wpf-application | |
--> | |
<Target Name="EmbedReferencedAssemblies" AfterTargets="ResolveAssemblyReferences"> | |
<ItemGroup> | |
<!-- get list of assemblies marked as CopyToLocal --> | |
<AssembliesToEmbed Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.dll'"/> |