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
| { | |
| "divingmask": { | |
| "PreferredContainer": [ | |
| "System.Collections.Hashtable", | |
| "System.Collections.Hashtable" | |
| ], | |
| "Attrs": { | |
| "category": "Equipment", | |
| "impactsoundtag": "impact_metal_light", | |
| "identifier": "divingmask", |
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
| let | |
| /* | |
| Convert any table to JSON | |
| */ | |
| // variables for later: | |
| args = [ | |
| MaxDateCutoff = #date(2010, 1, 5), | |
| InvalidDate = #date(2000, 1, 1), |
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
| let | |
| // for the url: https://mods.factorio.com/api/mods?page_size=10&size=5 | |
| //you would use: | |
| request_blob = Web.Contents( | |
| "https://mods.factorio.com/api", | |
| [ | |
| RelativePath = "/mods", | |
| Query = [ page_size = "10", page = "5"] | |
| ] | |
| ), |
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
| $oauth_token = "your token here" | |
| function ExampleRequest { | |
| <# | |
| .synopsis | |
| example that uses the Dropbox API: '/files/list_folder' | |
| .notes | |
| See also: | |
| Invoke-RestMethod | |
| Docs: |
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 AnsiColor([int]$AnsiNumber) { | |
| <# | |
| .synopsis | |
| Outputs a 3/4-bit ansi color sequence | |
| color '0' resets to the default color | |
| (Currently the integrated terminal has a width bug. Windows terminal works) | |
| #> | |
| "`e[", $AnsiNumber, 'm' -join '' | |
| } |
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
Show hidden characters
| [ | |
| /* for more see the series: | |
| - https: //devblogs.microsoft.com/commandline/windows-terminal-preview-1-3-release/ | |
| - https: //devblogs.microsoft.com/commandline/windows-terminal-preview-1-2-release/ | |
| - https: //devblogs.microsoft.com/commandline/windows-terminal-preview-1-1-release/ | |
| */ | |
| /* vs code -like palette, shows hotkeys if you need a reference */ | |
| { |
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 Format-ADUser { | |
| <# | |
| .synopsis | |
| Make ADUser data readable in a console | |
| .example | |
| $me = Get-ADUser identity -property * | |
| $me | Format-ADUser | |
| $me | Format-ADUser Medium |
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
| <# | |
| You can convert to base64 using this website: | |
| https://www.browserling.com/tools/image-to-base64 | |
| This runs on 'PowerShell' | |
| ( It requires changes to run on 'Windows Powershell' (legacy) ) | |
| For usage jump to the very last lines in this file: | |
| > $config = $runKwargs.DaxPng |
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
| ## 1 ## | |
| Label: Find, then count lines | |
| Command: | |
| find.exe | wc.exe -l |
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 Export-PlatformFolderPath { | |
| <# | |
| .description | |
| compare results of [Environment]::GetFolderPath() across different platforms and versions | |
| #> | |
| param( | |
| [Parameter(HelpMessage = 'skip converting to json')][switch]$PassThru | |
| ) | |
| $folderList = [enum]::GetNames( [System.Environment+SpecialFolder] ) | ForEach-Object { |