Last active
April 2, 2023 16:05
-
-
Save roolo/ba6a715e30e89e94aae888d2d4d57e50 to your computer and use it in GitHub Desktop.
Generate Wifi QR code with Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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