made with esnextbin
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
let inverseCaptcha = (path) => { | |
let arr = | |
Node_fs.readFileSync(path, `utf8) | |
|> Js.String.trim | |
|> Js.String.split(""); | |
Js.Array.reducei( | |
(acc, curr, idx) => | |
switch (idx == 0) { | |
| true => | |
let firstValue = int_of_string(curr); |
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 Type from "union-type"; | |
import { createStore, combineReducers } from "redux"; | |
import memoize from "ramda/src/memoize"; | |
import path from "ramda/src/path"; | |
import axios from "axios"; | |
import Future from "fluture"; | |
// MESSAGES | |
const Msg = Type({ |
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 { combineReducers, createStore } from "redux"; | |
import Type from "union-type"; | |
// MESSAGES | |
const Msg = Type({ INCREMENT: [], DECREMENT: [], DEFAULT: [] }); | |
// UPDATE | |
const nextState = Msg.caseOn({ |
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
function flatten(array) { | |
return array.reduce((acc, curr) => { | |
if (Array.isArray(curr)) { | |
return flatten([...acc, ...curr]) | |
} | |
return acc.concat(curr) | |
}, []) | |
} |
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
Verifying that "adamrecvlohe.id" is my Blockstack ID. https://onename.com/adamrecvlohe |
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
module Main exposing (..) | |
import Html exposing (Html, Attribute, div, text) | |
import Html.Attributes exposing (style) | |
import Time exposing (Time, every) | |
import List exposing (map) | |
import String exposing (join, length) | |
import Date exposing (fromTime, hour, minute, second) | |
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
module Main exposing (..) | |
import Html exposing (Html, Attribute, div, text) | |
import Html.Attributes exposing (style) | |
import Time exposing (Time, every, hour, minute, second, inHours, inMinutes, inSeconds) | |
import List exposing (map) | |
import String exposing (join, length) | |
-- STYLES |
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
module Main exposing (..) | |
import Html exposing (Html, text, div, button) | |
import Html.Events exposing (onClick) | |
import Random | |
import Maybe exposing (withDefault) | |
import List.Extra exposing (getAt) | |
-- MODEL |
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
init : ( Model, Cmd Msg ) | |
init = | |
( { author = "Adam", quote = "Elm is a nice language to use!" }, Cmd.none ) |