Skip to content

Instantly share code, notes, and snippets.

@takahashiyuya
Last active August 29, 2015 14:15
Show Gist options
  • Save takahashiyuya/5dae1e1b90eea3f9346a to your computer and use it in GitHub Desktop.
Save takahashiyuya/5dae1e1b90eea3f9346a to your computer and use it in GitHub Desktop.
Data URI scheme をシェルで生成する。そんで関数にしてコマンドを追加する
・シェル
echo "data:image/png;base64,"$(base64 ファイル名)
・コマンドにする
echo 'function datauri() { echo "data:image/png;base64,"$(base64 $1); }' >> .bash_profile
source .bash_profile
datauri ファイル名
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment