Last active
October 5, 2020 23:21
-
-
Save sean-m/13e0977164cc38d314cc0b80eda776e9 to your computer and use it in GitHub Desktop.
It gets old trying to do these by hand all the time, pipe to clip.exe and call it a day.
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
## Generate comment blocks that can denote regions in your script | |
filter HeaderComment { | |
[Alias('HC')] | |
param( | |
[Parameter(Position=0, ValueFromRemainingArguments)] | |
$msg | |
) | |
$msg = $msg -join ' ' | |
@" | |
################################################################################ | |
$($msg.PadLeft((76/2) + ([Math]::Ceiling($msg.Length/2))).PadRight(76).PadLeft(78,'#').PadRight(80,'#')) | |
################################################################################ | |
"@ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment