Skip to content

Instantly share code, notes, and snippets.

View danilbraun's full-sized avatar

Danil Braun danilbraun

View GitHub Profile

1 Software Design for Flexibility

Новая книга от одного из авторов культовой SICP (Gerald Jay Sussman) и principal author of Scheme (Chris Hanson) - «Software Design for Flexibility. How to Avoid Programming Yourself into a Corner». Авторы задаются «извечным» вопросом о гибкости кода и как ее достичь. Судя по оглавлению речь пойдет о различных техниках и подходах от комбинаторов до DSL и динамического программирования. Звучит очень интересно! https://mitpress.mit.edu/books/software-design-flexibility.

https://t.me/tripovozkiknig/62

2 Domain Modeling Made Functional

Книга про то как делать DDD методами функционального программирования (на F#, но многие аспекты применимы к ЯП без статической типизации)

@tobi-wan-kenobi
tobi-wan-kenobi / VOID-INSTALL.md
Last active April 17, 2024 06:57
Void Linux installation (NVMe, btrfs, LVM, full disk encryption using LUKS, 2FA-ish, SSD TRIM)

Void Linux installation (NVMe, btrfs, LVM, full disk encryption using LUKS, 2FA-ish, SSD TRIM)

Here's a record of my experiences when setting up Void Linux for the first time, maybe it contains useful information for somebody :-)

Basics

  • Laptop: Lenovo IdeaPad S340
  • Void Linux installer version: 20191109 (x86_64 musl)

Features

@howyay
howyay / Setting up Postfix on Debian.md
Last active May 1, 2024 22:04
A guide to set up a Postfix + Dovecot IMAP server with complete spf, dkim and dmarc support.

An ultimate guide to Postfix + Dovecot IMAP server with complete SPF, DKIM and DMARC support and additional instructions for a multi-domain setup

In this guide, domain.com will be your root domain and mail.domain.com will be the hostname of your mail server

@IanHopkinson
IanHopkinson / lxml_examples.py
Created November 24, 2015 19:42
Examples of xpath queries using lxml in python
#!/usr/bin/env python
# encoding: utf-8
import lxml.etree
import lxml.html
import requests
xml_sample = """<?xml version="1.0" encoding="UTF-8"?>
<foo:Results xmlns:foo="http://www.foo.com" xmlns="http://www.bah.com">
<foo:Recordset setCount="2">
@Bamco
Bamco / permutations.ml
Created August 4, 2013 21:08
Ocaml list permutations
(* interleave 1 [2;3] = [ [1;2;3]; [2;1;3]; [2;3;1] ] *)
let rec interleave x lst =
match lst with
| [] -> [[x]]
| hd::tl -> (x::lst) :: (List.map (fun y -> hd::y) (interleave x tl))
(*permutations [1; 2; 3] = [[1; 2; 3]; [2; 1; 3]; [2; 3; 1]; [1; 3; 2]; [3; 1; 2]; [3; 2; 1]] *)
let rec permutations lst =
match lst with
| hd::tl -> List.concat (List.map (interleave hd) (permutations tl))
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@dvanhorn
dvanhorn / memo-dyn.txt
Created August 24, 2012 17:53
Memoization vs dynamic programming
Memoization is fundamentally a top-down computation and dynamic
programming is fundamentally bottom-up. In memoization, we observe
that a computational *tree* can actually be represented as a
computational *DAG* (the single most underrated data structure in
computer science); we then use a black-box to turn the tree into a
DAG. But it allows the top-down description of the problem to remain
unchanged.
In dynamic programming, we make the same observation, but construct
the DAG from the bottom-up. That means we have to rewrite the