Skip to content

Instantly share code, notes, and snippets.

View mahtaran's full-sized avatar

Luka Leer mahtaran

View GitHub Profile
@mahtaran
mahtaran / upgrade-nvm-node.ps1
Created July 10, 2023 15:44
A PowerShell upgrade script for https://github.com/coreybutler/nvm-windows, which will carry over globally installed npm (and pnpm) packages
if ($args -contains "--help" -or $args.Length -eq 0) {
Write-Host "Usage: .\upgrade-node.ps1 <version> [--help] [--mock] [--no-confirm]"
Write-Host "Example: .\upgrade-node.ps1 20.4.0"
Write-Host "You can still use 'lts' or 'latest' as version"
Write-Host "Example: .\upgrade-node.ps1 latest"
Write-Host "Use the --mock flag to preview the changes without actually making them"
Write-Host "Use the --no-confirm flag to skip confirmation"
exit
}
msg_file="$1"
r_gitmoji_text="(:[a-z0-9_+-]+:)"
# r_gitmoji_unicode="[\u{1f300}-\u{1f5ff}\u{1f900}-\u{1f9ff}\u{1f600}-\u{1f64f}\u{1f680}-\u{1f6ff}\u{2600}-\u{26ff}\u{2700}-\u{27bf}\u{1f1e6}-\u{1f1ff}\u{1f191}-\u{1f251}\u{1f004}\u{1f0cf}\u{1f170}-\u{1f171}\u{1f17e}-\u{1f17f}\u{1f18e}\u{3030}\u{2b50}\u{2b55}\u{2934}-\u{2935}\u{2b05}-\u{2b07}\u{2b1b}-\u{2b1c}\u{3297}\u{3299}\u{303d}\u{00a9}\u{00ae}\u{2122}\u{23f3}\u{24c2}\u{23e9}-\u{23ef}\u{25b6}\u{23f8}-\u{23fa}\u{200d}]"
# unfortunately, the unicode regex is not supported, so we just match any non-whitespace
r_gitmoji_unicode="\S+"
r_gitmoji="(${r_gitmoji_text}|${r_gitmoji_unicode})"
r_subject="([[:graph:]][[:print:]]{0,70}[[:graph:]])"
print("Reached test.js");
@mahtaran
mahtaran / keybase.md
Created April 19, 2018 19:14
Just my keybase proof

Keybase proof

I hereby claim:

  • I am mahtaran on github.
  • I am mahtaran (https://keybase.io/mahtaran) on keybase.
  • I have a public key ASC_twF3CPxy0YrWmaV6aeijK9C_EUpy5_EbbQUKa4c6iwo

To claim this, I am signing this object: