Skip to content

Instantly share code, notes, and snippets.

@ixqbar
Created August 9, 2019 08:31
Show Gist options
  • Save ixqbar/d16e9fcd4bfc987c54c06793a2aa2c72 to your computer and use it in GitHub Desktop.
Save ixqbar/d16e9fcd4bfc987c54c06793a2aa2c72 to your computer and use it in GitHub Desktop.
base64copy
```bash
#!/bin/bash
function __base64 {
if [ "$1x" == "x" ]; then
return
fi
phpCommand="echo base64_encode(file_get_contents('$1'));"
php -r "$phpCommand" | pbcopy
}
__base64 $@
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment