I hereby claim:
- I am covertiii on github.
- I am covertiii (https://keybase.io/covertiii) on keybase.
- I have a public key ASA27Edl7chWD86oKjGyHrPFoHkXmqz-QDaygjlQ0DScLgo
To claim this, I am signing this object:
import React, { useState } from 'react'; | |
import axios from 'axios'; | |
import { api } from '../services/api.js'; | |
export const FileUpload = () => { | |
const [ state, setState ] = useState({loading: false, error: '', message: ''}); | |
const uploadFile = (event) => { | |
setState( s => ({...s, loading: true})); | |
console.log('starting upload'); |
I hereby claim:
To claim this, I am signing this object:
; I don't need this any more and I'm going to take it out of my codebase, but I want to have a reference for what I did | |
; There's probably a more elagent way of doing this, but I was in a rush and now I don't need it any more | |
; I used this as an example to get the ref: https://gist.github.com/pesterhazy/4d9df2edc303e5706d547aeabe0e17e1 | |
; Definition: | |
(defn on-scroll [tag cb attr & children] | |
(let [ref (r/atom nil) | |
on-scroll (fn [e] (cb e @ref))] | |
(r/create-class | |
{:component-did-mount |
;; I'm a little embarssed, but this took me about 2.5 hours to make. | |
;; Some of it was figuring out how to get compojure and ring-json | |
;; working togther. Another was I started on a really old tutorial | |
;; and so I updated to use the compojure template. I want to add other | |
;; endpoints on for comments and persist the data into a real database | |
;; (sqlite/postgres). | |
(ns blog.handler | |
(:require [compojure.core :refer :all] |
const R = require('ramda'); | |
const moment = require('moment'); | |
const Promise = require('bluebird'); | |
const fs = Promise.promisifyAll(require('fs')); | |
const csvParser = Promise.promisify(require('csv-parse')); | |
const file = process.argv[2]; | |
if(!file){ |
import Html exposing (..) | |
import Html.App as App | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput, onClick) | |
main = | |
App.beginnerProgram | |
{ model = model | |
, view = view |