I hereby claim:
- I am v0d1ch on github.
- I am v0d1ch (https://keybase.io/v0d1ch) on keybase.
- I have a public key whose fingerprint is 6397 5B1D A68A C22A 4F1C F1E5 9F24 F037 7283 01FA
To claim this, I am signing this object:
#!/bin/bash | |
# For mainnet | |
NET="mainnet" | |
NET_WITH_PREFIX="--mainnet" | |
# For preprod | |
#NET="testnet" | |
#NET_WITH_PREFIX="--testnet-magic 1" | |
# For preview |
I hereby claim:
To claim this, I am signing this object:
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE NamedFieldPuns #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE ScopedTypeVariables #-} |
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' |
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc883", withHoogle ? true }: | |
let | |
inherit (nixpkgs) pkgs; | |
pinnedUnstable = | |
pkgs.fetchFromGitHub { | |
owner = "NixOS"; | |
repo = "nixpkgs-channels"; | |
rev = "c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38"; | |
sha256 = "1ak7jqx94fjhc68xh1lh35kh3w3ndbadprrb762qgvcfb8351x8v"; | |
}; |
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 |
data Vec3 a = Vec3 a a a deriving (Eq, Show) | |
instance Functor Vec3 where | |
fmap f (Vec3 a b c) = Vec3 (f a) (f b) (f c) | |
instance Applicative Vec3 where | |
pure a = Vec3 a a a | |
(Vec3 f f' f'') <*> (Vec3 a b c) = Vec3 (f a) (f' b) (f'' c) | |
instance Foldable Vec3 where |
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 |
cpsTail :: [a] -> o -> ([a] -> o) -> o | |
cpsTail [] d = \f -> d | |
cpsTail (a:as) d = \f -> f as | |
cpsLoop :: (forall o. [a] -> o -> ([a] -> o) -> o) -> [a] -> [a] | |
cpsLoop f l = f l l id | |
safeTail :: [a] -> Maybe [a] |
# 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. |