2024
PowerShell "Oopsie"
Task - remove a specific string from each line of multiple CSV files. This task was added to the scripting exercise list. First - let's generate some CSV files to work with: $numberOfFiles = 10 $numberOfRows = 100 $fi...
How the way I work/code/investigate/debug changed with time & experience
How the way I work/code/investigate/debug changed with time & experience I use this metaphor when describing how I work these days. TL;DR; Quick feedback is king unit tests quick test in another way reproduce issues l...
My recommendations
Terminal etc. https://github.com/PowerShell/PowerShell - PowerShell 7+ - faster & better then Windows PowerShell https://ohmyposh.dev/ - amazing prompts - replace that old $ sign with amazing stuff https://github.com/...
PowerShell quirk
tl;dr In PowerShell if you want to return an array instead of one element of the array at the time do this: > @(1..2) | % { $a = "a" * $_; @($a,$_) } # wrong! will pipe/return 1 element at a time > @(1..2) | % { $a = ...
It will be great, set it up, don't use it, remove it
Today, I removed something I allowed to be created despite initially feeling it was redundant. A year ago, a student found a tool to auto-generate documentation for our internal SDK from code annotations. They propose...
Notes on keys, certs, certificates, HTTPS, SSL, SSH, TLS
key != cert (a key is different from a certificate) Keys are used to encrypt connections, certs are used to verify that the key owner is who he says he is. Certificate aka cert A certificate proves that a public key b...
node packages updating
tl;dr > npm install depcheck -g - install depcheck globally > depcheck - check for redundant packages > npm un this-redundant-package - uninstall redundant packages (repeat for all redundant packages) Create a pull-re...
axios, cookies & more
axios, cookies & more axios axios - promise-based HTTP client for node.js when used in node.js axios uses http module (https://nodejs.org/api/http.html) in node axios does not support cookies by itself (https://github...