Skip to content

Instantly share code, notes, and snippets.

View techthoughts2's full-sized avatar
🕵️‍♂️
Investigating a better artifact workflow

Jake Morrison techthoughts2

🕵️‍♂️
Investigating a better artifact workflow
View GitHub Profile
@techthoughts2
techthoughts2 / typescript_notes.ts
Last active September 2, 2022 00:13
tbd - notes taken while learning Typescript
/*
- Static typing
- Code completion
- Refactoring
- Shorthand notations
transpilation
typescript -> javascript
*/
@techthoughts2
techthoughts2 / javascript_notes.js
Last active August 31, 2022 18:13
tbd - notes taken while learning Javascript
console.log('Hello World')
//#region variables
/*
Cannot be a reserved keyword
Cannot start with a number
Cannot contain space or hyphen
Are case sensitive
*/
https://github.com/SeeminglyScience/EditorServicesCommandSuite
Install-Module EditorServicesCommandSuite -Scope CurrentUser -AllowPrerelease -RequiredVersion 1.0.0-beta4
# Place this in your VSCode profile
Import-CommandSuite
@techthoughts2
techthoughts2 / cdk_custom_pwsh_layer
Last active August 29, 2022 15:54
Some notes on custom lambda layers and integrating with the AWS CDK
# 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)
@techthoughts2
techthoughts2 / vscode_basic_powershell_settings.json5
Last active May 15, 2022 19:45
Basic VSCode settings for PowerShell development
{
// 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
@techthoughts2
techthoughts2 / update_azure_components
Last active May 13, 2022 23:07
These few lines will quickly update your local development environment to the latest Azure components.
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
# 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;
# wrap Measure-Command in & { } for increased measuring performance
Measure-Command { & {
$var = foreach ($i in 0..50000){
$i
}
}}
#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'
git update-index --add --chmod=+x install_terraform.sh