elements = []
for x in range(10000):
elements.append(x)
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
function h1 { | |
param([string]$Label) | |
"`n#### $label ####`n" | |
} | |
$regex = '^(.+?)([^\.]*)$' | |
$regex_named = '^(?<name>.+?)(?<ext>[^\.]*)$' | |
h1 "inputs:" | |
Get-ChildItem c: -File |
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
*.pbix |
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
{ | |
// example: <https://cdn.discordapp.com/attachments/447476117629304853/797526322200576030/Expand_Aliases_and_Splatting.mp4> | |
"powershell.codeFormatting.autoCorrectAliases": true, | |
"powershell.codeFormatting.useCorrectCasing": true, | |
"powershell.codeFormatting.useConstantStrings": true, | |
"files.defaultLanguage": "${activeEditorLanguage}", | |
"files.trimTrailingWhitespace": true, | |
"terminal.integrated.shell.windows": "C:/Program Files/PowerShell/7/pwsh.exe", | |
"terminal.integrated.shellArgs.windows": [ | |
"-NoLogo" |
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
// replace bad name | |
let | |
/* ignore this chunk */ | |
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSspPUtJRMgRiI0NjQxMTpVidaKW0otQUkAgQGxsZm5iZGUPEczOLizPz0kHCQGxibGRqZgSVgphjAtJlbGKqFBsLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [name = _t, customer = _t, UID = _t]), | |
#"Changed Type" = Table.TransformColumnTypes( | |
Source,{ | |
{"name", type text}, {"customer", Int64.Type}, {"UID", Int64.Type} | |
}), | |
/* select record, modify it, then call Replace |
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
let | |
Source = #"gen DateTimes", | |
TableDates = Table.FromList( | |
Source, | |
Splitter.SplitByNothing(), | |
{"SaleDate"}, | |
null, | |
ExtraValues.Error | |
), |
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
# [test]: only breakpoint in a pipe, not on first statement | |
Get-PSReadLineKeyHandler -bound -unbound # yes | |
| ? Group -eq Basic # no | |
| Join-String -seperator ', ' -property Key # no | |
| Out-Null | |
# [test] escaped-newline, on the first expression in a pipe # no | |
# <<next>> line is # yes | |
Get-PSReadLineKeyHandler -bound -unbound ` |