Skip to content

Instantly share code, notes, and snippets.

View voidlizard's full-sized avatar

Dmitry Zuikov voidlizard

View GitHub Profile
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE TypeOperators #-}
module PrototypeGenericService where
import Data.Kind
import Data.List qualified as List
data Method1
data Method2
instance ( MonadIO m
, MonadError OperationError m
, Storage sto h ByteString m
, Storage sto h ByteString IO
, h ~ HbSync
, ForGroupKeySymm s
) => MerkleWriter (ToEncrypt 'Symm s ByteString) h sto m where
type instance ToBlockW (ToEncrypt 'Symm s ByteString) = ByteString
{-# Language TemplateHaskell #-}
{-# Language AllowAmbiguousTypes #-}
{-# Language UndecidableInstances #-}
{-# Language MultiWayIf #-}
module QBLF.Proto where
import HBS2.Prelude.Plated
import HBS2.System.Logger.Simple
import HBS2.Clock
import HBS2.Hash
module Main where
import HBS2.Prelude
import HBS2.Base58
import HBS2.OrDie
import HBS2.Net.Proto.Types
import HBS2.Actors.Peer
import HBS2.Net.Proto.RefChan
import HBS2.Net.Messaging.Unix
import HBS2.Net.Proto.Definition()
import Streaming.Prelude qualified as S
import Streaming qualified as S
-- FIXME: move-to-library
readBlob :: forall m . ( MonadIO m
, HasStorage m
, Block ByteString ~ ByteString
)
=> HashRef
-> m (Maybe ByteString)
{-# Language TemplateHaskell #-}
module Main where
import HBS2.Prelude.Plated
import HBS2.Net.Proto.Types
import HBS2.Clock
import HBS2.Net.Messaging.TCP
import HBS2.Actors.Peer
import HBS2.System.Logger.Simple
module Main where
import HBS2.Clock
import HBS2.Prelude.Plated
import Control.Concurrent.Async
import Control.Concurrent (myThreadId)
import UnliftIO.Exception
import System.IO
import Control.Monad
module Main where
import HBS2.Clock
import Control.Concurrent.Async
import Control.Concurrent (myThreadId)
import UnliftIO.Exception
import System.IO
import Control.Monad
@voidlizard
voidlizard / tmux.conf
Created February 27, 2023 04:57 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
{-
Cache (Hash HbSync): 1.44s
Cache (SKey): 1.46s
HashMap (Hash HbSync): 0.17s
HashMap (Skey): 0.35s
Map (Hash HbSync): 0.34s
-}
module Main where