Skip to content

Instantly share code, notes, and snippets.

@maxwofford
Created May 23, 2026 00:42
Show Gist options
  • Select an option

  • Save maxwofford/522272a64394ca8a7fa016d7a7b3366f to your computer and use it in GitHub Desktop.

Select an option

Save maxwofford/522272a64394ca8a7fa016d7a7b3366f to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'securerandom'
key = SecureRandom.urlsafe_base64(ARGV[0]&.to_i || 32)
puts key
IO.popen('pbcopy', 'w') { |f| f << key.to_s }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment