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
for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d" |
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
FROM microsoft/windowsservercore | |
LABEL Description="Seq Event Server" Vendor="Datalust" Version="4.2.1113" | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] | |
RUN Invoke-WebRequest https://getseq.net/Download/Begin?version=4.2.1113 -OutFile c:\seq-installer.msi -UseBasicParsing ; \ | |
Start-Process msiexec.exe -ArgumentList '/i c:\seq-installer.msi /quiet /norestart' -Wait ; \ | |
Remove-Item c:\seq-installer.msi -Force |
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 System; | |
using System.Globalization; | |
namespace Common | |
{ | |
/// <summary> | |
/// A value type representing an Entity Tag (ETag). | |
/// </summary> | |
public struct ETag : IFormattable | |
{ |
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
param ( | |
[string]$SwaggerUrl, | |
[switch]$Pretty = $false | |
) | |
$paths = Invoke-WebRequest $swaggerUrl | ConvertFrom-Json | Select-Object -ExpandProperty paths | |
$result = @() # result array | |
foreach ($prop in $paths.PSObject.Properties) { | |
$pathName = $prop.Name |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
"profiles": | |
[ | |
{ | |
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
"hidden": false, |
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-WeatherForecast { | |
<# | |
.SYNOPSIS | |
Gets the weather forecast for a location of choice. | |
.DESCRIPTION | |
Displays the weather forecast for a location of choice, directly in | |
the terminal. Powered by wttr.in. | |
.NOTES | |
Author: Tormod Fjeldskår | |
.EXAMPLE |
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 System; | |
using System.Text; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var password = "SuperSecretLongPassword"; | |
var bytes = Encoding.UTF8.GetBytes(password); | |
var base64 = Convert.ToBase64String(bytes); |
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
# This will allow the job to only execute for Pull Request builds | |
condition: eq(variables['Build.Reason'], 'PullRequest') | |
steps: | |
- task: UseDotNet@2 | |
displayName: 'Use .Net Core runtime 3.1.x' | |
inputs: | |
packageType: runtime | |
version: 3.1.x |
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
/// <summary> | |
/// Async edition of <see cref="Lazy{T}"/>. | |
/// </summary> | |
/// <typeparam name="T">The type of the lazily initialized value</typeparam> | |
public class AsyncLazy<T> : Lazy<Task<T>> | |
{ | |
public AsyncLazy(Func<T> valueFactory) | |
: base(() => Task.Run(valueFactory)) { } | |
public AsyncLazy(Func<Task<T>> asyncValueFactory) |