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
#!/bin/bash | |
# For mainnet | |
NET="mainnet" | |
NET_WITH_PREFIX="--mainnet" | |
# For preprod | |
#NET="testnet" | |
#NET_WITH_PREFIX="--testnet-magic 1" | |
# For preview |
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
traverseX :: forall f. Functor f = (a -> f a) -> Vec3 a -> f (Vec3 a) | |
traverseX f (Vec3 x y z) = (\h -> Vec3 h) <$> f x | |
traverseY :: forall f. Functor f = (a -> f a) -> Vec3 a -> f (Vec3 a) | |
traverseY f (Vec3 x y z) = (\h -> Vec3 h) <$> f x | |
traverseZ :: forall f. Functor f = (a -> f a) -> Vec3 a -> f (Vec3 a) | |
traverseZ f (Vec3 x y z) = (\h -> Vec3 h) <$> f x | |
type Lens s a = forall f. Funtor f => (a -> f a) -> s -> f s |
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
data Store s a = Store (s -> a) s | |
instance Comonad (Store s) where | |
extract :: Store s a -> a | |
extract (Store f s) = f s | |
-- "replacing all values with containers, and then consuming those containers again" | |
extend :: Store s a -> (Store s a -> b) -> Store s b | |
extend s f = fmap f $ duplicate s | |
-- verbose: Store (\x -> f' $ Store f x) s |
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
# Basic commands | |
:Git [args] # does what you'd expect | |
all of your `~/.gitconfig` aliases are available. | |
:Git! [args] # same as before, dumping output to a tmp file | |
Moving inside a repo. |
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
{-# LANGUAGE QuasiQuotes, TypeFamilies, GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, TemplateHaskell, OverloadedStrings #-} | |
{-# LANGUAGE GADTs, MultiParamTypeClasses, TypeSynonymInstances #-} | |
import Data.Text (Text) | |
import Data.ByteString (ByteString) | |
import Database.Persist.Sqlite | |
import Control.Monad.Logger (runStderrLoggingT) | |
import Yesod | |
import Yesod.Auth |