| Useful web utilities | |
|---|---|
|
Live editor Markdown Tables Copy -> pastesand converts CSV to Markdown | |
This file contains hidden or 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.Management.Automation.Language | |
| using namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic | |
| function IncorrectUseOfFormatCmdletsInMiddleOfPipeline { | |
| <# | |
| .SYNOPSIS | |
| Do not place format-table in the middle of a pipeline | |
| .DESCRIPTION | |
| Detects when Format commands are commonly misused in the middle of a pipeline, causing unexpected results with display objects that dont have the same properties as the original piped object. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Most of these settings work with other languages.
This file contains hidden or 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 | |
| using namespace System.Linq | |
| using namespace System.Collections | |
| using namespace System.Collections.Generic | |
| using namespace System.Management.Automation | |
| using namespace System.Management.Automation.Language | |
| using namespace System.Reflection | |
| # Hey person reading this! Don't do this, alright? You'll have a bad time. ty |
This file contains hidden or 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
| <# | |
| Aims to grow the understanding of using OpenAI in PoweShell by providing an example of an implementation and references | |
| #> | |
| function Invoke-OpenAI { | |
| <# | |
| .SYNOPSIS | |
| Convert natural language commands into commands in PowerShell | |
| .EXAMPLE |
if you like going down rabbit holes, the thread got me reading
- https://docs.microsoft.com/en-us/dotnet/standard/base-types/best-practices-strings
- https://docs.microsoft.com/en-us/dotnet/core/extensions/performing-culture-insensitive-string-operations-in-collections
IComparable.CompareTo(Object)
Compares the current instance with another object of the same type and returns an integer that indicates https://docs.microsoft.com/en-us/dotnet/api/system.icomparable.compareto?view=net-6.0
This file contains hidden or 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 Embrace { | |
| $Input | Join-String -op '[' -os ']' | |
| } | |
| Set-Alias 'Write-Color' Ninmonkey.Console\Write-ConsoleColorZd | |
| Set-Alias 'Csv' -Value Csv2 | |
| & { | |
| foreach ($x in 'a'..'f') { | |
| "parent_id_$x.md" | |
| @( |
This file contains hidden or 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 -version 7 | |
| #You can load this script with $(iwr https://tinyurl.com/TraceAICommand | iex) | |
| using namespace Microsoft.ApplicationInsights | |
| using namespace Microsoft.ApplicationInsights.Extensibility | |
| using namespace Microsoft.ApplicationInsights.DataContracts | |
| using namespace System.Management.Automation | |
| using namespace System.Collections.Generic | |
| using namespace System.Net | |
| #Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/app/console |