Skip to content

Instantly share code, notes, and snippets.

View pete-murphy's full-sized avatar

Pete Murphy pete-murphy

View GitHub Profile
@pete-murphy
pete-murphy / Labs1.md
Last active May 17, 2019 15:46
Labs Development Journal

At the start of this week I worked with other teammates to create a universal set of ESLint and Prettier configurations that all of us can use across our editors and IDEs. The idea is to get us on the same page formatting-wise so that we can avoid unnecessary merge conflicts that arise from different editor configurations. I feel like this would be particularly important in this project, because we are all going to be editing much of the same files. I also contributed to editing the product canvas.

This week has been mostly researching AWS services that we might integrate into our app. We started looking at AWS Amplify for bootstrapping an app with authentication and API's with code generation for all possible handlers. This is a nice approach, and it seems to be how AWS services are designed to be used--all or nothing.

Currently I am looking into how to use AWS solely for authentication using their Cognito service. Cognito user pools would essentially take the place of our users table, which is not the pr

module FPtoMax where
import Data.Char
import System.Random
import Text.Read
main :: IO ()
main = do
putStrLn "What is your name?"
name <- getLine
module Polynomial where
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
import Data.Monoid
strip :: Eq a => a -> [a] -> [a]
strip _ [] = []
strip x ys = reverse $ dropWhile (== x) (reverse ys)
{-# LANGUAGE TupleSections #-}
module Main where
import Criterion.Main
import Data.Char (toLower)
import Data.Function (on)
import Data.List (sort)
import Data.Map (fromListWith)
{- SEVEN -}
-- | Here are two data types that may help:
data Empty
data Branch left centre right
-- | a. Using these, and the outline for 'HList' above, build a heterogeneous
-- /tree/. None of the variables should be existential.
module Main where
import Prelude
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Exception (throw)
import Web.DOM.NonElementParentNode (getElementById)
import Web.HTML (window)
import Web.HTML.HTMLDocument (toNonElementParentNode)
import Web.HTML.Window (document)
module Main where
import Prelude
import Effect (Effect)
import Data.Foldable (fold)
import TryPureScript (h1, h2, p, text, list, indent, link, render, code)
import Data.Array as Array
import Data.List as List
function swapEither<L, A>(e: E.Either<L, A>): E.Either<A, L> {
return E.isLeft(e) ? E.right(e.value) : E.left(e.value)
}
function toRight<L>(e: E.Either<L, unknown>): E.Either<never, L | undefined> {
return E.isLeft(e) ? E.right(e.value) : E.right(undefined)
}
function validateFields(
v: FieldValues
): E.Either<FieldErrors, DAN_FAKE_SHAPE_SCHEDULER> {
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RankNTypes #-}
module ValidateForm where
import Data.Function ((&))
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Traversable