🕵️♂️
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
/* | |
- Static typing | |
- Code completion | |
- Refactoring | |
- Shorthand notations | |
transpilation | |
typescript -> javascript | |
*/ |
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
console.log('Hello World') | |
//#region variables | |
/* | |
Cannot be a reserved keyword | |
Cannot start with a number | |
Cannot contain space or hyphen | |
Are case sensitive | |
*/ |
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
https://github.com/SeeminglyScience/EditorServicesCommandSuite | |
Install-Module EditorServicesCommandSuite -Scope CurrentUser -AllowPrerelease -RequiredVersion 1.0.0-beta4 | |
# Place this in your VSCode profile | |
Import-CommandSuite |
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
# CDK Custom pwsh | |
## Links | |
- [Introducing the PowerShell custom runtime for AWS Lambda](https://aws.amazon.com/blogs/compute/introducing-the-powershell-custom-runtime-for-aws-lambda/) | |
- [awslabs / aws-lambda-powershell-runtime](https://github.com/awslabs/aws-lambda-powershell-runtime) | |
- [Custom AWS Lambda runtimes](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html) | |
- [How to use Lambda Layers in AWS CDK - Complete Guide](https://bobbyhadz.com/blog/aws-cdk-lambda-layers) | |
- [bobbyhadz / aws-cdk-lambda-layers](https://github.com/bobbyhadz/aws-cdk-lambda-layers) | |
- [KevinMarquette / PowerShell-Lambda-Runtime](https://github.com/KevinMarquette/PowerShell-Lambda-Runtime) |
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
{ | |
// editor | |
"editor.quickSuggestionsDelay": 1, | |
"editor.tabCompletion": "on", | |
"files.defaultLanguage": "powershell", | |
// powershell settings changes | |
// you can specify a custom location for the powershell.exe/pwsh.exe file | |
// not required if you just want to use the default locations |
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
winget upgrade Microsoft.AzureStorageExplorer --silent --accept-package-agreements --accept-source-agreements | |
winget upgrade Microsoft.AzureCLI --silent --accept-package-agreements --accept-source-agreements | |
winget upgrade Microsoft.Bicep --silent --accept-package-agreements --accept-source-agreements | |
az bicep upgrade | |
Update-Module Az |
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
# OFS - special variable that contains the string to be used as the output field seperator | |
$OFS = '...';$array = ('first','last');[string]$array; Remove-Variable OFS | |
$array = ('first','last');[string]$array; |
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
# wrap Measure-Command in & { } for increased measuring performance | |
Measure-Command { & { | |
$var = foreach ($i in 0..50000){ | |
$i | |
} | |
}} |
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
#region functions | |
function Convert-PSToVSCodeSnippet { | |
<# | |
.SYNOPSIS | |
Converts PowerShell Code to VSCode snippet format | |
.DESCRIPTION | |
Leverages the ConvertTo-VSCodeSnippet script available on PSGallery to convert PowerShell code to properly formatted VSCode snippet JSON | |
.EXAMPLE | |
Convert-PSToVSCodeSnippet -Name 'MySnippet' -Body $body -Prefix 'MyPrefix' -Description 'MyDescription' |
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
git update-index --add --chmod=+x install_terraform.sh |