Skip to content

Instantly share code, notes, and snippets.

@roolo
Last active April 2, 2023 16:05
Show Gist options
  • Save roolo/ba6a715e30e89e94aae888d2d4d57e50 to your computer and use it in GitHub Desktop.
Save roolo/ba6a715e30e89e94aae888d2d4d57e50 to your computer and use it in GitHub Desktop.
Generate Wifi QR code with Ruby
$ gem install rqrcode
$ irb -r rqrcode
2.5.3 :001 > File.open('/tmp/wifi-connection.png', File::CREAT | File::WRONLY) {|f| f.write RQRCode::QRCode.new('WIFI:S:Wifi name;T:WPA;P:wifi password;;').as_png(size: 400) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment