Skip to content

Instantly share code, notes, and snippets.

Collapsing Example

Summary (Click to Expand) tl;dr
🐒> ls . 

full code below

@romero126
romero126 / ConstrainedVariableInterpolation
Last active May 9, 2021 22:44
ExpandStringVisitor: Context locked String Interpolation using AstVisitor
class ConstrainedVariableInterpolation : System.Management.Automation.Language.AstVisitor {
hidden [Hashtable] $Property
[System.Collections.Generic.List[PSCustomObject]] $Result
hidden [System.Management.Automation.Language.Ast] $Ast
[System.Management.Automation.Language.AstVisitAction] CheckForPostAction([System.Management.Automation.Language.Ast] $ast, [System.Management.Automation.Language.AstVisitAction] $action)
{
throw 'CheckForPostAction not supported'
}
@ninmonkey
ninmonkey / Console.PowerLine.Readme.md
Last active September 15, 2021 18:40
Console Powerline Links
@ninmonkey
ninmonkey / Query-All-Anchor_Elements.pbix
Last active September 30, 2021 02:01
Select elements usinig css selectors, instead of drilling down -- manually scraping.
@ninmonkey
ninmonkey / Powershell-Call-Native-Apps-With-Dynamic-Args.md
Last active October 3, 2021 15:45
Calling non-powershell commands (ie: exe) with a dynamically built array of args

Basic Example: Arguments as an array

$gitArgs = 'log', '-n', '3'
& git @gitArgs

Executes:

git log -n 3
@jborean93
jborean93 / Start-WindowsTerminal.ps1
Created May 22, 2020 21:25
Starts Windows Terminal as the current user, another user, and optionally elevated.
# Copyright: (c) 2020, Jordan Borean (@jborean93) <jborean93@gmail.com>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
Function Start-WindowsTerminal {
<#
.SYNOPSIS
Start Windows Terminal from PowerShell.
.DESCRIPTION
Start Windows Terminal from PowerShell. This can be done as the current user, another user, and optionally
@ninmonkey
ninmonkey / Powerquery WebRequest Simple.pbix
Last active October 8, 2021 18:40
Viewing HTTP Status codes and error response in Power Query / Power BI