Tutorial and tips for GitHub Actions workflows
Here's a couple of key handlers to add indenting and outdenting with Alt [
and ]
for PSReadLine.
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 namespace System.Collections.Generic | |
# Encapsulate an arbitrary command | |
class PaneCommand { | |
[string]$Command | |
PaneCommand() { | |
$this.Command = ""; | |
} |
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
$request = Invoke-WebRequest "https://support.microsoft.com/en-gb/help/4464619" –UseBasicParsing | |
If ($request.StatusCode -eq 200) { | |
$Matches = [regex]::Matches($request.Content, 'href="([a-z0-9-\/]*)">([a-zA-Z]*) ([0-9]{1,2}), ([0-9]{4}).*?(KB[0-9]*) \(OS Build 17763.([0-9]*)\)(?: ([a-zA-Z-]*)<\/a>)?') | |
if ($Matches.Count -gt 0) { | |
$LatestServer2019Raw = [PSCustomObject]@{ | |
'OS build' = $Matches[0].Groups[6].Value | |
'Date' = "$($Matches[0].Groups[3].Value) $($Matches[0].Groups[2].Value) $($Matches[0].Groups[4].Value)" | |
'URL' = "https://support.microsoft.com$($Matches[0].Groups[1].Value)" | |
'KB' = $Matches[0].Groups[5].Value | |
'Info' = $Matches[0].Groups[7].Value |
This is a small tool designed to emulate the Sublime style Command Palette as follows.
It requires the use of a specific extension to load the js file from this gist.
I'm using the APC extension, and the usage is as follows.