Colors in Power BI
[ Static Alpha Hsla ] :=
"hsla(219, 68%, 20%, 0.5)"[ Static Alpha RGBA ] := | filter Select-StringMatch { | |
| <# | |
| .SYNOPSIS | |
| A companion to select-string to quickly fetch the value of a capture group, named or indexed | |
| .DESCRIPTION | |
| With -replace or -match we have the simple $matches['group'] syntax, but this doesn't really exist for Select-String | |
| and the typical options are not pipeline friendly. The default object returned from Select-String is not that friendly | |
| either if all you want is the value(s) of a capture group to then pipe to another command. This is basically a pipeline | |
| friendly version of $matches. |
classDiagram
class Shape{
<<interface>>
noOfVertices
draw()
}
class Color{
<<enumeration>>
RED| Get-GHIssueReport 'powershell/powershell','powershell/vscode-powershell','PowerShell/PowerShellEditorServices' -NumberOfPages 3 |
| function ConvertFrom-IniContent { | |
| <# | |
| .SYNOPSIS | |
| Parses content from ini/conf files into nested hashtables. | |
| .EXAMPLE | |
| Get-Content \\wsl$\Ubuntu\etc\wsl.conf | ConvertFrom-IniContent | |
| .EXAMPLE | |
| ConvertFrom-IniContent (Get-Content ~\.wslconf -Raw) | |
| .EXAMPLE | |
| " |
PowerShell, as a language, is very self-discoverable.
When you Get-Command, you get a rich object about a command.
This can have a lot of metadata.
You can and should also use inline help (like this script does).
Sometimes, I want more metadata than the command or parameter can actually provide.
| using namespace System.Management.Automation | |
| using namespace System.Collections.Generic | |
| function Split-Verbose { | |
| <# | |
| .SYNOPSIS | |
| Services a similar purpose to the cmdletbinding WarningVariable parameter but for verbose. | |
| .NOTES | |
| In order for this to work your previous command must have 4>&1 at the end of the command prior to piping to this | |
| #> | |
| [CmdletBinding()] |
| using namespace Microsoft.Exchange.Management.AdminApiProvider | |
| using namespace Microsoft.Exchange.Management.ExoPowershellSnapin | |
| using namespace System.Collections.Generic | |
| using namespace System.Net.Http | |
| using namespace System.Net.Http.Headers | |
| using namespace System.Threading. | |
| <# | |
| I made this as a way to overcome some limitations with very complicated filter queries that exceed the REST limit, while being able to run them in parallel without resorting to runspaces | |
| #> |