I hereby claim:
- I am jermdavis on github.
- I am jermdavis (https://keybase.io/jermdavis) on keybase.
- I have a public key ASBCmmvpawRgYxXAmGg-piQyK4YuE-VmHghwBDPTQGRWuAo
To claim this, I am signing this object:
using Statiq.App; | |
using Statiq.Common; | |
using StatiqGenerator.Customisations.ReadingTime; | |
namespace StatiqGenerator.Customisations.DisappearingLinks | |
{ | |
public class ExpiringLinkConfigurator : IConfigurator<Bootstrapper> | |
{ | |
public void Configure(Bootstrapper configurable) |
#Requires -RunAsAdministrator | |
param( | |
[string]$dockerEnginePath = "C:\", | |
[string]$dockerInstallPath = "C:\Docker", | |
[string]$dockerEngineUrl = "https://download.docker.com/win/static/stable/x86_64/docker-20.10.8.zip", | |
[string]$dockerZip = "docker.zip", | |
[string]$serviceName = "docker", | |
[string]$composeEngineUrl = "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Windows-x86_64.exe", |
async Task Main() | |
{ | |
var pipeline = new ExampleAsyncPipeline(); | |
var uri = new Uri("https://news.bbc.co.uk/"); | |
var tempFile = await pipeline.ProcessAsync(uri); | |
Console.WriteLine($"{uri} saved to {tempFile}"); | |
} |
async Task Main() | |
{ | |
var pipeline = new ExampleAsyncPipeline(); | |
var uri = new Uri("https://news.bbc.co.uk/"); | |
var tempFile = await pipeline.ProcessAsync(uri); | |
Console.WriteLine($"{uri} saved to {tempFile}"); | |
} |
I hereby claim:
To claim this, I am signing this object:
function Write-EmbeddedFile | |
{ | |
param | |
( | |
[string]$base64, | |
[string]$targetFile | |
) | |
process | |
{ | |
$Content = [System.Convert]::FromBase64String($base64) |
[cmdletbinding(SupportsShouldProcess=$True)] | |
param( | |
# What .tar.gz file should be extracted? Must exist. | |
[Parameter(Mandatory=$True)] | |
[string]$FileToExtract, | |
# What folder should the files be extracted into? Does not need to exist | |
[Parameter(Mandatory=$True)] | |
[string]$TargetFolder, |
## | |
## private functions | |
## | |
# | |
# If necessary, download a file and unzip it to the specified location | |
# | |
function downloadAndUnzipIfRequired | |
{ | |
Param( |
public struct Either<SUCCESS, FAILURE> | |
{ | |
private readonly bool _isSuccess; | |
private readonly SUCCESS _success; | |
private readonly FAILURE _failure; | |
public bool IsSuccess => _isSuccess; | |
public bool IsFailure => !IsSuccess; | |
public SUCCESS SuccessValue => _success; |
using System; | |
namespace LoggingPipeline | |
{ | |
public interface IPipelineStep<INPUT, OUTPUT> | |
{ | |
OUTPUT Process(INPUT input); | |
} | |