This file contains 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 Statiq.App; | |
using Statiq.Common; | |
using StatiqGenerator.Customisations.ReadingTime; | |
namespace StatiqGenerator.Customisations.DisappearingLinks | |
{ | |
public class ExpiringLinkConfigurator : IConfigurator<Bootstrapper> | |
{ | |
public void Configure(Bootstrapper configurable) |
This file contains 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
[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, |
This file contains 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
#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", |
This file contains 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
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}"); | |
} |
This file contains 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
<%@ page language="c#" enableeventvalidation="false" autoeventwireup="true" enableviewstate="false" %> | |
<%@ import namespace="System.Security.Permissions" %> | |
<%@ import namespace="System.Collections.Generic" %> | |
<%@ import namespace="System.Threading" %> | |
<%@ import namespace="System.Security.Principal" %> | |
<%@ import namespace="Newtonsoft.Json" %> | |
<%@ import namespace="Sitecore.Data.Items" %> | |
<script runat="server"> |
This file contains 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.Collections.Generic; | |
namespace StronglyTypedPipelines | |
{ | |
public class LoopStep<INPUT,OUTPUT> : IPipelineStep<IEnumerable<INPUT>, IEnumerable<OUTPUT>> | |
{ | |
private IPipelineStep<INPUT, OUTPUT> _internalStep; | |
public LoopStep(IPipelineStep<INPUT, OUTPUT> internalStep) |
This file contains 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; | |
namespace StronglyTypedPipelines | |
{ | |
/// <summary> | |
/// Base type for individual pipeline steps. | |
/// Descendants of this type map an input value to an output value. | |
/// The input and output types can differ. | |
/// </summary> |
This file contains 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 Write-EmbeddedFile | |
{ | |
param | |
( | |
[string]$base64, | |
[string]$targetFile | |
) | |
process | |
{ | |
$Content = [System.Convert]::FromBase64String($base64) |
This file contains 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( | |
[Parameter(Mandatory=$true)] | |
[string]$url, | |
[Parameter(Mandatory=$true)] | |
[string]$target | |
) | |
function Fetch-WebsiteCredentials | |
{ | |
$file = "dev.creds.xml" |
This file contains 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( | |
$solrVersion = "6.6.2", | |
$installFolder = "c:\solr", | |
$solrPort = "8983", | |
$solrHost = "solr", | |
$solrSSL = $true, | |
$nssmVersion = "2.24", | |
$JREVersion = "1.8.0_151" | |
) |
NewerOlder