// Option.ts
// definition
export class None {
readonly tag: 'None' = 'None'
This file contains hidden or 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 { OutputOf, string, type, Type, TypeOf, Validation } from 'io-ts'; | |
import React, { FC, useState } from 'react'; | |
import { either, left, map, right } from 'fp-ts/lib/Either'; | |
import { sequenceS } from 'fp-ts/lib/Apply'; | |
import { NumberFromString } from 'io-ts-types/lib/NumberFromString'; | |
import { pipe } from 'fp-ts/lib/pipeable'; | |
const formDataCodec = type({ | |
age: NumberFromString, | |
password: string, |
This file contains hidden or 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
/* Cheerio-powered parser for the DJ DATA score page on the beatmania IIDX website. | |
Requires 'cheerio', 'request', and 'iconv' packages. | |
Needs 'Cookie' header from manual login for authentication. | |
Results in an array of JSON-formatted scores, which looks like this: | |
{ | |
"songs": [{ | |
"song": { | |
"name": "SONG NAME", |
This file contains hidden or 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
const daggy = require('daggy') | |
const compose = (f, g) => x => f(g(x)) | |
const id = x => x | |
const kleisli_comp = (f, g) => x => f(x).chain(g) | |
//=============FREE============= | |
const Free = daggy.taggedSum({Impure: ['x', 'f'], Pure: ['x']}) | |
const {Impure, Pure} = Free |
This file contains hidden or 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
# Detect architecture | |
if (CMAKE_SIZEOF_VOID_P MATCHES 8) | |
set( PROJECT_ARCH "x86_64" ) | |
else(CMAKE_SIZEOF_VOID_P MATCHES 8) | |
set( PROJECT_ARCH "x86" ) | |
endif(CMAKE_SIZEOF_VOID_P MATCHES 8) | |
# FFmpeg |
This file contains hidden or 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 React from 'react'; | |
import _ from 'lodash'; | |
import Rx from 'rx'; | |
import superagent from 'superagent'; | |
let api = { | |
host: 'http//localhost:3001', | |
getData(query, cb) { | |
superagent |
NewerOlder