I hereby claim:
- I am ben52 on github.
- I am bengie (https://keybase.io/bengie) on keybase.
- I have a public key ASBEq4HYtYrmod-lKq3bISGJ0N7Mii0md1Wf06voo91F6Qo
To claim this, I am signing this object:
| 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(); |
I hereby claim:
To claim this, I am signing this object:
| const moment = require('moment'); | |
| function getRangeOfDates(start, end, key, arr = [start.startOf(key)]) { | |
| if(start.isAfter(end)) throw new Error('start must precede end') | |
| const next = moment(start).add(1, key).startOf(key); | |
| if(next.isAfter(end, key)) return arr; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| function fb(steps, series = [], current = 1, last = 0) { | |
| if(steps === 0) return series.reduce((a, b) => a + b); | |
| return fb(--steps, series.concat(current), current + last, current) | |
| } |