Skip to content

Instantly share code, notes, and snippets.

@cesarfigueroa
Last active October 5, 2015 14:27
Show Gist options
  • Save cesarfigueroa/2820619 to your computer and use it in GitHub Desktop.
Save cesarfigueroa/2820619 to your computer and use it in GitHub Desktop.
Base64 Encoder with Data URIs
#!/usr/bin/env sh
read -p 'File? ' file
echo 'data:'$(file --mime-type -b $file)';base64,'$(base64 -i $file) | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment