Skip to content

Instantly share code, notes, and snippets.

@Sleavely
Sleavely / command.js
Last active January 1, 2016 04:49 — forked from JoelBesada/README.md
Premailer bookmarklet
(function(){
document.body.appendChild(document.createElement('script')).src='http://premailer.dialect.ca/inc/bookmarklet-1.0.js';
})();
@Sleavely
Sleavely / download-file.js
Last active August 31, 2022 16:45 — forked from javilobo8/download-file.js
Download files from Lambda with AWS Amplify
await API.get('myCloudApi', '/items', {
responseType: 'blob',
response: true
})
.then((response) => {
const blob = new Blob([response.data], { type: 'application/octet-stream' })
const filename = response.headers['content-disposition'].split('"')[1]
if (typeof window.navigator.msSaveBlob !== 'undefined') {