Skip to content

Instantly share code, notes, and snippets.

@fsackur
fsackur / Wait-LogLine.ps1
Last active July 4, 2021 01:37
Waits for lines in log files matching a pattern.
function Wait-LogLine
{
<#
.SYNOPSIS
Waits for lines in log files matching a pattern.
.DESCRIPTION
This command blocks, reading a file until a line appears that matches a pattern. If the
line matches the pattern, the entire line is written to the output stream.
@fsackur
fsackur / ModuleFast.ps1
Created August 3, 2021 12:29 — forked from JustinGrote/ModuleFast.ps1
A high performance Powershell Gallery Module Installer
#requires -version 5
<#
.SYNOPSIS
High Performance Powershell Module Installation
.DESCRIPTION
This is a proof of concept for using the Powershell Gallery OData API and HTTPClient to parallel install packages
It is also a demonstration of using async tasks in powershell appropriately. Who says powershell can't be fast?
This drastically reduces the bandwidth/load against Powershell Gallery by only requesting the required data
It also handles dependencies (via Nuget), checks for existing packages, and caches already downloaded packages