Skip to content

Instantly share code, notes, and snippets.

@padawanR0k
padawanR0k / index.tsx
Created September 3, 2018 14:25
react fileRender
class Insert extends React.Component<any, EventState> {
public fileUpload = (e: any) => {
const reader = new FileReader();
const name = e.target.name;
reader.onload = () => {
const obj = {};
obj[name] = reader.result;
this.setState(obj);
};
reader.readAsDataURL(e.target.files[0]);
@padawanR0k
padawanR0k / file.js
Last active August 24, 2018 05:25
react component generator, [프로젝트]/scripts/에 위치시킨후 yarn file 파일명 폴더명 // package.json 수정필요
var fs = require('fs');
// console.log(process.argv);
console.log('=============================');
console.log('\n');
console.log('신규 컴포넌트를 작성합니다.');
console.log('\n');
console.log('-----------------------------');
if (process.argv.length > 2) {
console.log('\n');
const arr = process.argv[2].split("/");
@padawanR0k
padawanR0k / seoulnGyeonggido.geojson
Created August 22, 2018 08:34
서울 & 경기도 geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.