Skip to content

Instantly share code, notes, and snippets.

View duxsco's full-sized avatar

David Sardari duxsco

View GitHub Profile
@duxsco
duxsco / openpgp.md
Created February 28, 2023 18:37
Proof for Keyoxide

$argon2id$v=19$m=64,t=512,p=2$5B3kDsGCaT0E44cHh0d6kw$Mny+1YkYA404V8CLuTd/vQ

@duxsco
duxsco / unset.md
Last active May 8, 2022 23:50
Prevent "tainting" Bash script variables via environment

I decided to use following convention for variables in my Bash scripts:

A) Variables are written without curly brackets if:

  • They are fine to be set via environment, e.g. $HOME
  • The environment doesn't play a role, e.g. $OPTARG whose value is set by getopts

B) All other variables are written with curly brackets, e.g.: ${KERNEL_VERSION}

Variables that fall under scenario B) are unset at the beginning of the Bash script.