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 { assign } = Object | |
| const mergeResults = (pipeline, step) => ( | |
| pipeline.then((context) => ( | |
| step(context).then((result) => ( | |
| assign({}, context, result) | |
| )) | |
| )) | |
| ) |
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 flatMap = (array, func) => ( | |
| array.reduce((result, element) => ( | |
| result.concat(func(element)) | |
| ), []) | |
| ) |
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
| module Main where | |
| import System.IO | |
| import Control.Concurrent | |
| import Control.Concurrent.STM | |
| type Error = String | |
| data Payload | |
| = Increment |
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
| .envrc |
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 URL = require('url') | |
| const QS = require('qs') | |
| const { createElement } = require('react') | |
| const { renderToString } = require('react-dom/server') | |
| const { createServer } = require('http') | |
| const logger = require('connect-logger') | |
| const connect = require('connect') | |
| const components = require('./components') |
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
| module Functor | |
| ( Functor | |
| , lift | |
| , apply | |
| , map | |
| , Monad | |
| , join | |
| , flatMap | |
| , Maybe(..) |
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
| #! /usr/bin/env sh | |
| # {provider}://{user}:{password}@{host}:{port}/{dbname} | |
| provider=`echo $DATABASE_URL | grep '://' | sed 's/^\(.*\):\/\/.*/\1/'` | |
| url_without_provider=`echo $DATABASE_URL | sed s/"$provider:\/\/"//` | |
| # extract the user and password (if any) | |
| userpass=`echo $url_without_provider | grep @ | cut -d@ -f1` | |
| pass=`echo $userpass | grep : | cut -d: -f2` |
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
| export const finishRegistration = ({ id, attributes }) => (dispatch) => { | |
| dispatch({ | |
| type: 'FINISH_REGISTRATION', | |
| payload: { id } | |
| }) | |
| return finish({ id, attributes }).then(({ | |
| registration, | |
| personalCampaign, | |
| account |
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
| module Data.Tree where | |
| import Data.Monoid | |
| data KeyValue k v = KeyValue k v | |
| instance (Show k, Show v) => Show (KeyValue k v) where | |
| show (KeyValue k v) = "(" ++ show k ++ ", " ++ show v ++ ")" | |
| instance (Eq k) => Eq (KeyValue k v) where |
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
| cabal: Entering directory '/run/user/1000/cabal-tmp-20052/ghcjs-0.2.1' | |
| [1 of 1] Compiling Main ( /run/user/1000/cabal-tmp-20052/ghcjs-0.2.1/dist/dist-sandbox-6a8a5e5a/setup/setup.hs, /run/user/1000/cabal-tmp-20052/ghcjs-0.2.1/dist/dist-sandbox-6a8a5e5a/setup/Main.o ) | |
| Linking /run/user/1000/cabal-tmp-20052/ghcjs-0.2.1/dist/dist-sandbox-6a8a5e5a/setup/setup ... | |
| Configuring ghcjs-0.2.1... | |
| Flags chosen: no-wrapper-install=False, network-uri=True, compiler-only=False | |
| Dependency Cabal ==1.24.2.0: using Cabal-1.24.2.0 | |
| Dependency HTTP ==4000.3.9: using HTTP-4000.3.9 | |
| Dependency aeson ==0.11.3.0: using aeson-0.11.3.0 | |
| Dependency array ==0.5.1.1: using array-0.5.1.1 | |
| Dependency attoparsec ==0.13.2.0: using attoparsec-0.13.2.0 |