Skip to content

Instantly share code, notes, and snippets.

View daenamkim's full-sized avatar
🎯
Focusing

Daenam Kim daenamkim

🎯
Focusing
View GitHub Profile
@daenamkim
daenamkim / download-file.js
Created May 18, 2018 06:38 — forked from javilobo8/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');
document.body.appendChild(link);
@daenamkim
daenamkim / GoJs.jsx
Created April 25, 2018 08:14
GoJS React Component Proof of concept
import React, {Component} from 'react';
import go from 'gojs';
const goObj = go.GraphObject.make;
export default class GoJs extends Component {
constructor (props) {
super (props);
this.renderCanvas = this.renderCanvas.bind (this);