Skip to content

Instantly share code, notes, and snippets.

@YoEight
YoEight / improve_fonts.md
Created Jan 15, 2021 — forked from j1cs/improve_fonts.md
Improve fonts archlinux
View improve_fonts.md

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@YoEight
YoEight / delete.hs
Created Feb 16, 2020
How delete for Map should be.
View delete.hs
import Data.Map (Map)
import Data.Map as Map
--------------------------------------------------------------------------------
-- | I'm bad at naming thing however, we are going to use that datastructure
-- so we could lookup and delete in one single pass.
data Blob a b = Blob a b
--------------------------------------------------------------------------------
instance Functor (Blob a) where
@YoEight
YoEight / Main.hs
Last active Sep 27, 2019
eventstore client showdown
View Main.hs
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NumericUnderscores #-}
module Main where
import Control.Monad
import Database.EventStore
import qualified Data.Text as Text
import Data.Aeson
View cluster.hs
#!/usr/bin/env stack
-- stack --resolver lts-13.27 script --package text --package turtle --package async
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent.Async
import Data.Foldable
import Data.Text (pack)
import Turtle
@YoEight
YoEight / Play.hs
Created Apr 19, 2019
Implementing `machines` using `streaming` library
View Play.hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
module Play where
import Prelude hiding ((.), id)
import Data.Foldable
import Streaming.Internal
import Control.Category
infixr 9 <~
@YoEight
YoEight / docker-cleanup-resources.md
Created Aug 3, 2018 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
@YoEight
YoEight / extensible.hs
Created Apr 27, 2018
POC of eventsource-api using an extensible-effects interface
View extensible.hs
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE UndecidableInstances #-}
module Main where
@YoEight
YoEight / stopwatch.hs
Created Jun 7, 2017
Simple threadsafe stopwatch
View stopwatch.hs
--------------------------------------------------------------------------------
-- |
-- Module : Database.EventStore.Internal.Stopwatch
-- Copyright : (C) 2017 Yorick Laupa
-- License : (see the file LICENSE)
--
-- Maintainer : Yorick Laupa <yo.eight@gmail.com>
-- Stability : provisional
-- Portability : non-portable
--
@YoEight
YoEight / graph.hs
Created Jun 19, 2016
Stream based Graph processing example in Haskell
View graph.hs
module Graph where
import qualified Data.Map as M
import qualified Data.Set as S
data Vertex v =
Vertex
{ vertexId :: Int
, vertexValue :: v
}