This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as A from 'fp-ts/Array' | |
import * as Ap from 'fp-ts/Apply' | |
import * as A1 from 'fp-ts-std/Array' | |
import * as ROA from 'fp-ts/ReadonlyArray' | |
import * as NEA from 'fp-ts/NonEmptyArray' | |
import * as O from 'fp-ts/Option' | |
import * as Eq from 'fp-ts/Eq' | |
import * as Ord from 'fp-ts/Ord' | |
import * as R from 'fp-ts/Record' | |
import * as _ from 'lodash' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// works | |
(http-client/post | |
"https://api.mixpanel.com/import#past-events" | |
{:debug true :debug-body true | |
:basic-auth [mixpanel-api-secret] | |
:headers {"Accept" "text/plain" | |
"Content-Type" "application/x-www-form-urlencoded"} | |
:form-params {:verbose 1 | |
:data json-event-str} | |
:as :json}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar todo; | |
elements | |
: (element|emptyLine)* EOF | |
; | |
element | |
: '*' ( ' ' | '\t' )* CONTENT NL+ | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as E from 'fp-ts/Either' | |
import { pipe } from 'fp-ts/function' | |
import * as t from 'io-ts' | |
import { failure } from 'io-ts/PathReporter' | |
import { toRequestHandler } from 'hyper-ts/lib/express' | |
import express from 'express' | |
import * as H from 'hyper-ts' | |
import * as M from 'hyper-ts/lib/Middleware' | |
import pgPromise from 'pg-promise' | |
import * as TE from 'fp-ts/TaskEither' |