View recursive-foldable.hs
{-# LANGUAGE DeriveFoldable #-}
module Main where
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Foldable
data Object a
= Value a
View pythagoreans.hs
{-# LANGUAGE LambdaCase #-}
module Main
( main
) where
import Control.Monad (guard)
import Control.Monad.Trans.State (StateT (StateT), evalStateT)
import Data.List (unfoldr)
import Data.Maybe (listToMaybe)
View weekdays-until.hs
module Main where
import Data.Time
import Data.Time.Clock
import Data.Time.Format
import Data.Time.Calendar
import Data.Maybe
import System.Environment
import Text.ParserCombinators.ReadP
import Data.Char
View biuld-error.log
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
View Tree.hs
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
View one-req.js
export const finishRegistration = ({ id, attributes }) => (dispatch) => {
dispatch({
type: 'FINISH_REGISTRATION',
payload: { id }
})
return finish({ id, attributes }).then(({
registration,
personalCampaign,
account
View create-db.sh
#! /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`
View mucking-about.hs
module Functor
( Functor
, lift
, apply
, map
, Monad
, join
, flatMap
, Maybe(..)
View index.js
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')