Skip to content

Instantly share code, notes, and snippets.

@tjmw
Created October 15, 2013 15:17
Show Gist options
  • Save tjmw/6993247 to your computer and use it in GitHub Desktop.
Save tjmw/6993247 to your computer and use it in GitHub Desktop.
Base64 encoded string representation of an image file
ruby -rbase64 -e "File.open(ARGV[0], 'r') {|file| puts Base64.encode64(file.read) }" <file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment