-
-
Save halferty/7eab6e9683da5bfc291ab135edcb2899 to your computer and use it in GitHub Desktop.
Base-64 encode a file
This file contains hidden or 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
#!/usr/bin/env ruby | |
require "base64" | |
file_name = ARGV[0] | |
data = File.read file_name | |
puts Base64.encode64 data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment