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
| # Just a minimal provider experiment | |
| $fuzz = Get-Random | |
| $provider = @" | |
| namespace Provide { | |
| using System; | |
| using System.Management.Automation; | |
| using System.Management.Automation.Provider; |
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
| <# | |
| .SYNOPSIS | |
| Write Python in PowerShell | |
| .DESCRIPTION | |
| Write Python in PowerShell without worrying about spacing. | |
| .NOTES | |
| Python is a pretty cool language, with pretty opinionated ideas about spacing. | |
| Not all appreciate this spacing pattern, so this function "fixes" it. |
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
| <# | |
| .SYNOPSIS | |
| Dictionary Wrapper | |
| .DESCRIPTION | |
| Writes a wrapper class for a dictionary. | |
| #> | |
| param( | |
| [string] | |
| $TypeName = 'Foo', |
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
| <# | |
| .SYNOPSIS | |
| This is my VSCode profile. | |
| .DESCRIPTION | |
| This is my VSCode profile. It runs when PowerShell starts in VSCode. | |
| .NOTES | |
| This is my VSCode profile. | |
| There are many profiles like it. | |
| This one is mine. | |
| #> |
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
| <# | |
| .EXAMPLE | |
| ./Polyhedron.3mf.ps1 -Vertices @( | |
| # The four points at the base | |
| [Numerics.Vector3]::new(10,10,0) | |
| [Numerics.Vector3]::new(10,-10,0) | |
| [Numerics.Vector3]::new(-10,-10,0) | |
| [Numerics.Vector3]::new(-10,10,0) | |
| # The apex |
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
| param( | |
| [double] | |
| $Width = 10, | |
| [double] | |
| $Height = 10, | |
| [double] | |
| $Depth = 3, |
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
| $bit38 = [uri]"https://strudel.cc/#c2V0Y3BtKDEyOC8yKQokbjE6IG5vdGUoYAo8Z0AwLjUgZ0AwLjUgZyBmIGUgZz4oMyw4KQpgKS5zb3VuZCgic2luZSIpLmNvbG9yKCJ5ZWxsb3cgZ29sZGVucm9kIikuX3BpYW5vcm9sbCgpLl9zY29wZSgpCiRuMV8yOiBub3RlKGA8CjxnQDAuNSBnQDAuNSBnIGYgZSBnPigzLDgpCj5gKS5zb3VuZCgic2luZSIpLmNvbG9yKCJyZWQgb3JhbmdlIikuanV4KHJldikuX3BpYW5vcm9sbCgpLl9zY29wZSgpCgokbjI6IG5vdGUoYDwKPGFAMC41IGFAMC41IGEgYyBiIGE%2BKDMsOCkKPmApLnNvdW5kKCJzaW5lIHRyaSIpLmNvbG9yKCJncmVlbiBsaW1lIikucGhhc2VyKDEpLl9waWFub3JvbGwoKS5fc2NvcGUoKQoKJG4zOiBub3RlKGA8CjxhQDAuNSBhQDAuNSBhIGMgYiBhPigzLDgpCj5gKS5zb3VuZCgic2luZSB0cmkiKS5jb2xvcigiYmx1ZSBjeWFuIikuanV4KHJldikuX3BpYW5vcm9sbCgpLl9zY29wZSgpCgoK" | |
| $bitBouncy = [uri]"https://strudel.cc/#c2V0Y3BtKDEyOC8yKQoKCi8qCiAgQHRpdGxlIEJpdCBCb3VuY3kKICBAYnkgCiovCgpjb25zdCBjYWZlMjYgPSBub3RlKCJbPGMgYSBmIGU%2BKDIsNildIikuY29sb3IoIiM0NDg4ZmYiKQpjb25zdCBjYWZlMzggPSBub3RlKCJbPGMgYSBmIGU%2BKDMsOCldIikuY29sb3IoInJlZCIpCi8vY29uc3QgY2FmZTQ2ID0gbm90ZSgiWzxjIGEgZiBlPig0LDYpXSIpLmNvbG9yKCJ5ZWxsb3ciKQpjb25zdCBjYWZlNTggPSBub3RlKCJbPGMgYSBmIG |
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
| setcpm(32) | |
| // Track 1 (C:major) | |
| $: note(`< | |
| [- - - - - - - - - - - - - f3 g3 f3] [[g3,f3] - - g3 - f3 - g3 - - f3 - g3 - - f3 - g3 - f3 - g3 - f3 - g3 - - a3 - a#3 - c4 - d4 - d#4 - - f4 - g4 - a4 - - a#4 - c5 - d5 - d#5 - - f5 - g5 - - a5 - - -] [a#5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - g#5 - a#5 - g#5 - - - - f#5 - - - - g#5 - - - - f#5 - - - - g#5 - - - - - f#5 - - - -] [f5 d#5 d5 c#5 - d#5 e5 f5] | |
| [- - - - - - - - d5 - - - - - - - a#4 - - c5 - a#4 - a4 - g#4 - - - - - - - - - - - - - - f#4 - - - - - - - f4 - - - - - - - f4 - - - - - - -] [a#3 - - - - - - - [g3,b3] - - - - - - - - - - - - - - c4 g#3 - - - - - - [a#3,d4] - - - - - - - - [g3,b3] - - - - - - - - - - - - - - c4 g#3 - - - - - - -] [[a#3,d4] - - - - - - - f4 - - - - - - g4 - g#4 g4 g#4 - - - f4 - - - - - - - g4 g#4 - g4 g#4 - - - f4 - - - - - - - g4 - g#4 g4 g#4 - - f4 - - - - - - - - -] [a#4 - - - - - - [c4,e4,c#4] - - - - - - - - - - - - - - - [c#4,f4] - - - - - - - [d#4,g4] - - - - - - - - [c4,e4] - - - - - - - - - - |
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
| $notemoji = foreach ($note in $fromDecps) { | |
| $fraction = @($note -split '@')[1] -as [double] | |
| $timelessNote = $note -replace '@.+?$' | |
| $timelessNote = $timelessNote -replace '\#', '♯' | |
| switch ($fraction) { | |
| (1/4) { | |
| $timelessNote + " `u{1D15F}" | |
| } | |
| (1/2) { | |
| $timelessNote + " `u{1D1E3}" |
NewerOlder