Skip to content

Instantly share code, notes, and snippets.

@plmercereau
plmercereau / raspberry-pi-zero-2.nix
Last active January 10, 2024 13:46
Nix module to create SD images for Rasperry Pi Zero 2 W
{ config, lib, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix>
./sd-image.nix
];
system.stateVersion = "23.11";
# Pi Zero 2 struggles to work without swap
sdImage.swap.enable = true;
@Kedrigern
Kedrigern / Tree.hs
Last active March 27, 2024 00:43
Implementation of binary search tree in Haskell
{- Implementation of BST (binary search tree)
Script is absolutly free/libre, but with no guarantee.
Author: Ondrej Profant -}
import qualified Data.List
{- DEF data structure -}
data (Ord a, Eq a) => Tree a = Nil | Node (Tree a) a (Tree a)
deriving Show