Skip to content

Instantly share code, notes, and snippets.

View michaelwestphal's full-sized avatar
🖖
Vim long and prosper!

Michael Westphal michaelwestphal

🖖
Vim long and prosper!
View GitHub Profile
@michaelwestphal
michaelwestphal / kubikey_otp_cli_script.md
Created January 10, 2023 20:03
Kubikey OTP CLI script

A Yubikey, the commandline, and easily generating and copying a One-Time Password

  1. Install ykman via homebrew on the Mac.
brew install ykman
  1. Create bash/zsh function somewhere in your shell rc files
function otp() {
 code=$(ykman oath accounts code  -s)
//
// For when those pesky sites decide that you shouldn't be allowed to paste into an input...
//
document.addEventListener('paste', (e) => {
e.stopImmediatePropagation();
return true;
}, true);