Skip to content

Instantly share code, notes, and snippets.

View dzmitry-lahoda's full-sized avatar

dzmitry-lahoda dzmitry-lahoda

View GitHub Profile

Generate gpg key and add it to your GitHub account for commit signing & verification

Step 1 (Skip this if you already have GitHub CLI and GnuPG installed)

Install GnuPG and GitHub official CLI tool. Instructions:

@HandsomeManKris
HandsomeManKris / order_book.py
Created November 3, 2021 14:18
Simple python order book
import enum
import queue
import time
from collections import defaultdict
class Side(enum.Enum):
BUY = 0
SELL = 1
@davidfowl
davidfowl / MinimalAPIs.md
Last active September 15, 2024 18:58
Minimal APIs at a glance
@folex
folex / Cargo.toml
Created July 1, 2021 16:37
Use Fluence from Rust with ConnectedClient crate
[package]
name = "concl"
version = "0.1.0"
edition = "2018"
[dependencies]
connected-client = { git = "https://github.com/fluencelabs/fluence" }
eyre = "0.6.5"
maplit = "1.0.2"
serde_json = "1.0.64"
@spencerpogo
spencerpogo / json2nix.py
Last active June 10, 2024 06:42
Converts JSON objects into nix (hackishly).
"""Converts JSON objects into nix (hackishly)."""
import sys
import json
INDENT = " " * 2
def strip_comments(t):
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active July 31, 2024 07:07
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@alexchiri
alexchiri / get-started-with-kind-in-wsl2-installation-instructions.md
Last active May 2, 2024 20:37
Get started with kind in WSL2 - installation instructions
@Szer
Szer / lazy.fs
Last active February 4, 2020 14:53
Lazy Builder
[<AutoOpen>]
module LazyBuilder =
let inline force(x: Lazy<_>) = x.Force()
type LazyCont<'a> = LazyCont of (unit -> Lazy<'a>)
type LazyBuilder() =
member __.Return x = lazy x
member __.ReturnFrom (x: Lazy<_>) = x
member __.Bind(Lazy x, f) = f x
member __.Delay f = LazyCont f
member __.Run (LazyCont f) = Lazy.Create (f >> force)
@trajano
trajano / settings.json
Last active June 21, 2024 11:27
Windows Terminal (with git bash and additional shortcuts)
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{00000000-0000-0000-ba54-000000000002}",
"launchMode": "maximized",
"theme": "light",
"useTabSwitcher": false,
"tabWidthMode": "titleLength",
"profiles": {
@CMCDragonkai
CMCDragonkai / nix_inputs.md
Last active September 19, 2024 04:33
Understanding Nix Inputs #nix

Understanding Nix Inputs

Every Nix derivation produces a Nix store output that has 3 things:

  • Executables
  • Libraries
  • Data

Executables are always exported using the PATH environment variable. This is pretty much automatic.