Skip to content

Instantly share code, notes, and snippets.

@gavinr
Created June 23, 2020 14:56
Show Gist options
  • Save gavinr/5c7dc4508ab4bc6558f37cf1ae4bfe86 to your computer and use it in GitHub Desktop.
Save gavinr/5c7dc4508ab4bc6558f37cf1ae4bfe86 to your computer and use it in GitHub Desktop.
A list of useful terminal commands I've come across over the years.

Subresource Integrity

If you'd like to use Subresource Integrity in your <script ...> tag, to generate the string for a particular JS file:

curl FULL_URL_TO_JS_FILE | openssl dgst -sha384 -binary | openssl base64 -A

For example:

curl https://unpkg.com/[email protected]/dist/esri-leaflet-cluster.js | openssl dgst -sha384 -binary | openssl base64 -A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment