Skip to content

Instantly share code, notes, and snippets.

View Ben52's full-sized avatar
🎯
Focusing

Binyomin Greenes Ben52

🎯
Focusing
View GitHub Profile
@Ben52
Ben52 / introrx.md
Created September 19, 2016 17:00 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The Why and When of Choosing Elm

What is Elm?

  • Language (and "framework") for building web frontend applications
  • Can be used in place of HTML, CSS and JavaScript
  • Compiles into the above
@Ben52
Ben52 / download-file.js
Created August 15, 2018 19:39 — forked from Tomassito/download-file.js
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
link.click();