Skip to content

Instantly share code, notes, and snippets.

@hyjk2000
Created February 7, 2021 09:07
Show Gist options
  • Save hyjk2000/4f5f72c8df1f9a5ce40ea87a0eba2096 to your computer and use it in GitHub Desktop.
Save hyjk2000/4f5f72c8df1f9a5ce40ea87a0eba2096 to your computer and use it in GitHub Desktop.
File to Base-64
require 'base64'
print Base64.encode64(File.open(ARGV.first, 'rb').read).gsub(/\s/, '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment