Recently Updated Pages
Docker Buildx Multi-Arch
sudo docker buildx create --use --name multi-arch-builder Usage: sudo docker buildx build --pla...
macOS Defaults
Auto-Resize Columns in column view defaults write com.apple.finder _FXEnableColumnAutoSizing -bo...
Handle Exceptions with Task.WhenAll()
var tasks = Enumerable.Range(0, 10).Select(async _ => await Task.Delay(1000)); var whenAll = Tas...
RegEx in multiple files multi-line pattern
pcregrep -h -r --include=".*\.cs" -M "LogEvent\([\s\S]*?\)\;" . -h: Exclude filenames -r: rec...
Async Parallel
static Task ParallelForEachAsync<T> (IEnumerable<T> source, ...
Left outer join
from leftTable in context.leftTable join rightTable in context.rightTable on leftTable.FKRight...
List iteration using span
var list = new List<int>(); foreach(var item in CollectionsMarshal.AsSpan(list)) { } On...
Optional<T>
See Attachments
Load Assembly Dynamically
In order to Copy NuGet dependecies to the output folder add this to classlibrary.csproj: <CopyLo...
Mount host volumes in WSL2
Add the following to /etc/wsl.conf [automount] options = "metadata"
Change file encoding with linux
To get current encoding: file -i {filename} To convert it: iconv -f {sourceEncoding} -t {targe...
Build project with SourceGenerator on linux
Add Microsoft.Net.Compilers.Toolset package to the project that references the source generator.
Batching with LINQ
static IEnumerable<IEnumerable<T>> Batch<T>(this IEnumerable<T> source, int batchSize) { ...
Authentik NPM Redirect with Websocket support
# Increase buffer size for large headers # This is needed only if you get 'upstream sent too b...
AsyncHelper
public static class AsyncHelper { private static readonly TaskFactory _myTaskFact...