🕵️♂️
View git_commands
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 config --global -e | |
git config --list --show-origin | |
git config --global user.name | |
git config --global user.email | |
git config --global core.editor "code --wait" | |
Windows creds | |
git config --global credential.helper wincred | |
git clone |
View pwsh_whatif
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://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-shouldprocess?view=powershell-7.3 | |
[CmdletBinding(ConfirmImpact = 'Low', | |
SupportsShouldProcess = $true)] | |
# $PSCmdlet.ShouldProcess('TARGET') | |
# $PSCmdlet.ShouldProcess('TARGET','OPERATION') | |
# $PSCmdlet.ShouldProcess('MESSAGE','TARGET','OPERATION') | |
# -Confirm --> $ConfirmPreference = 'Low' | |
# ShouldProcess intercepts WhatIf* --> no need to pass it on |
View pwsh_dynamic_parameter
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
DynamicParam { | |
if (-not [String]::IsNullOrWhiteSpace($CICDChoice) -and $script:repoToCICD.ContainsKey($CICDChoice) ) { | |
$attrRepo = [System.Management.Automation.ParameterAttribute]::new() | |
$attrRepo.ParameterSetName = 'Choice' | |
$attrRepo.Mandatory = $true | |
$attrRepo.HelpMessage = 'TBD' | |
$attrRepoValidation = [System.Management.Automation.ValidateSetAttribute]::new([String[]]$script:repoToCICD[$CICDChoice]) | |
$attributeCollection = [System.Collections.ObjectModel.Collection[System.Attribute]]::new() |
View cdk_pwsh_runtime_bootstrap.ps1
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 settings | |
#! Enter all required modules you want to bootstrap for use in your PowerShell lambda layers | |
$requiredModules = @( | |
@{ | |
ModuleName = 'AWS.Tools.Common' | |
ModuleVersion = '4.1.175' | |
}, | |
@{ | |
ModuleName = 'PoshGram' |
View typescript_notes.ts
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 | |
*/ |
View javascript_notes.js
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 | |
*/ |
View cdk_custom_pwsh_layer
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) |
View win_ts_setup
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
# AWS CDK Typescript setup on Windows | |
## Install Requirements | |
```bash | |
# install nodejs | |
winget install OpenJS.NodeJS | |
# if already installed upgrade | |
winget upgrade OpenJS.NodeJS | |
View update_azure_components
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 |
View pwsh_ofs
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; |
NewerOlder