Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric Wolf typetetris

  • Germany
View GitHub Profile
View flake.nix
{
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
@typetetris
typetetris / latency.txt
Created Jul 6, 2021 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
View gist:37a14f68be5d05ceb7981c7b74f277e7
Updating dependencies
Resolving dependencies...
1: fact: nixops-with-plugins is 0.1.0
1: derived: nixops-with-plugins
1: fact: nixops-with-plugins depends on nixops (2.0.0 git rev master)
1: fact: nixops-with-plugins depends on nixops-aws (1.0 git branch master)
1: fact: nixops-with-plugins depends on nixopsvbox (1.7 git branch master)
1: fact: nixops-with-plugins depends on nixops-virtd (1.0 git branch master)
1: fact: nixops-with-plugins depends on nixops-digitalocean (2.0 git branch master)
1: fact: nixops-with-plugins depends on nixops-gcp (1.0 git branch master)
View ssh-keys
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPrSldp7lyqflHxk52ep3YuV9c9i0RhoTHyStlWwrVQT ericwolf42@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB0DLlw7rKNdJr0G9EeCSS2+wWjrCub2eaD7mpNJ8NHt typetetris@typetetris-Precision-7530"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJZQ9Y0l4Yq6gyreFDcdh6zsFo8eMK3FKPifojbP45iiGlQlCEAZXcxy3di5hllABtd5k4Q7R1b1gmvC1nBYaIETm9Goyx3hGLv6KP8X21zIwQAOydA5eYchv8G4LfLAKuNQ8yxCHZl NbDn3BJCMRh6ohjANLsig7VXjH+ikouVsySPh+2xROf/2mfMIacsfGYUceCsUaYeiV4O6N5iHPLlK/wL/BZfTOigQfioI97gvIEIiGGg+4tIVJxwPD2VFQF8PQfuZjPFs+GUilEUSP9IO16adxKLqlHwOHpn9hnGPJjeLcOude5Cids8zoE+f0JuU8NQ szvuNepVGtBBHw260Bvav2KjahXtzFg2Oe9rrV5v67WBv7gfWFWr4v/B8a/peX0hgJvwgjZ7RJK9R7cIqkIJvqmlNGOt8S4zBGMxUq9dAsoA/QZSvLAlyVUqaMoouqXwd7tr4mgkfU3zUky0nFLEFJUbGh3BXGxq33WEhtZ6evgWv/80dr9tTaNYx6rO IEQ7abtU2oehHeRw7NNCH6AAvNwUe04okAgxr2tvzti8HCN9L9T1A2k4hxNfqSWVu5IZS2F5Wi9GH3rDPpM2gHqLtc07e2lWg93BJ+kSefipSFr2i0IbA+t/iET95v1FwLZ3gxvxwP0kk4lsP5pPBKiM0fo2SmnaxFw11FnXQ== openpgp:0x39D365 64"
"ssh-rs
View startdb.sh
#!/usr/bin/env bash
mkdir -p sandbox
if pg_ctl -D sandbox/db status | grep 'is running' > /dev/null
then
echo "already running"
else
pg_ctl -w -D sandbox/db -l sandbox/dblogfile start
fi
# psql -h localhost -p 5431 -U dev dev # to connect
View createdb.sh
#!/usr/bin/env bash
set -e
mkdir -p sandbox/db
initdb --auth=trust --auth-host=trust --auth-local=trust --pgdata=sandbox/db --encoding="UTF-8" --locale=C --username dev
echo "unix_socket_directories = '.'" >> sandbox/db/postgresql.conf
echo "port = 5431" >> sandbox/db/postgresql.conf
pg_ctl -w -D sandbox/db -l sandbox/dblogfile start
createdb -h localhost -p 5431 -U dev -w -E UTF-8 -l C -O dev dev
pg_ctl -D sandbox/db stop -m s
View haskeller_competency_matrix.md

Haskeller Competency Matrix

See also List of materials about Software Design in Haskell

Junior Middle Senior Architect
Haskell level Basic Haskell Intermediate Haskell Advanced Haskell Language-agnostic
Haskell knowledge scope Learn you a Haskell Get programming with Haskell Haskell in Depth Knows several languages from different categories
Get programming with Haskell Haskell in Depth Functional Design and Architecture
[Other books on Software Architecture in Haskell](https://github.com/graninas/software-design-in-haskell#Books-on-S
View default.nix
let
hackage = ../hackage.nix;
stackage = ../stackage.nix;
nix-tools = ../nix-tools;
in
{ # Fetch the latest haskell.nix and import its default.nix
haskellNix ? import ../haskell.nix {
sourcesOverride = {
hackage = hackage;
stackage = stackage;
View nixops-with-plugin.nix
{pkgs ? import <nixpkgs> {}}:
let
overrides = import ./overrides.nix { inherit pkgs; };
nixops-libvirtd = import ../nixops-libvirtd/default.nix { inherit pkgs; };
in
pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;
propagatedBuildInputs = [
pkgs.openssh