This file contains hidden or 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
void Main() { | |
var s = new S(); | |
foreach (var x in s) {} | |
} | |
struct S { | |
public SpanSplitEnumerator GetEnumerator() => new SpanSplitEnumerator(); | |
} | |
ref struct SpanSplitEnumerator { |
This file contains hidden or 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
function Get-AllExceptions { | |
param( | |
[Exception] $E | |
) | |
while($E -ne $null) { | |
$E | |
$E = $E.InnerException | |
} | |
} |
This file contains hidden or 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
// slightly modified to reduce bindgen vomit | |
/****************************************************************************\ | |
DismApi.H | |
Copyright (c) Microsoft Corporation. | |
All rights reserved. | |
\****************************************************************************/ |
This file contains hidden or 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/bash | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh | |
# Check for Homebrew, | |
# Install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
fi |
This file contains hidden or 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 Test; | |
IHost host = Host.CreateDefaultBuilder(args) | |
.ConfigureServices(services => | |
{ | |
services.AddHostedService<Worker>(); | |
}) | |
.Build(); | |
var config = host.Services.GetRequiredService<IConfiguration>(); |
OlderNewer