Skip to content

Instantly share code, notes, and snippets.

@kbroman
Created November 18, 2024 17:14
Show Gist options
  • Save kbroman/69b82fbc239ed3a3a4c5d08faf2ca2eb to your computer and use it in GitHub Desktop.
Save kbroman/69b82fbc239ed3a3a4c5d08faf2ca2eb to your computer and use it in GitHub Desktop.
#!/usr/bin/Rscript --no-save --no-restore --no-init-file --no-site-file
# give 3 random digits from 0-9 to add to a password
# plus a random digit 0-4 to indicate where in the password to put it
#
# would be best to revise this with some more control
dig3 <- sample(0:9, 3, replace=TRUE)
dig1 <- sample(0:4, 1)
cat(paste(dig3, collapse=""), dig1, "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment