Skip to content

Instantly share code, notes, and snippets.

Avatar

Gabin Aureche Zhouzi

View GitHub Profile
View download-file.js
(async () => {
const response = await fetch('<url>', {
method: 'get',
headers: {
'Authorization': 'Bearer <token>'
}
});
const blob = await response.blob();
const url = URL.createObjectURL(blob);
@Zhouzi
Zhouzi / raven-config.html
Last active May 22, 2018 — forked from impressiver/raven-config.html
Raven.js configuration for logging JavaScript exceptions to Sentry (https://getsentry.com/). Without the added ignore options, you'll quickly find yourself swamped with unactionable exceptions due to shoddy browser plugins and 3rd party script errors.
View raven-config.html
<!-- Raven.js Config -->
<script src="{{ JS_PATH }}/lib/raven.js" type="text/javascript"></script>
<script type="text/javascript">
// Ignore list based off: https://gist.github.com/1878283
var ravenOptions = {
// Will cause a deprecation warning, but the demise of `ignoreErrors` is still under discussion.
// See: https://github.com/getsentry/raven-js/issues/73
ignoreErrors: [
// Random plugins/extensions
'top.GLOBALS',