Skip to content

Instantly share code, notes, and snippets.

@nh2
nh2 / Typechecking-git-history-fast.md
Created January 16, 2020 17:40
Haskell: Type-checking a git history of commits fast with interactive rebasing and ghci -e

Type-checking your whole Pull Request before submission

You want to make a pull request to a Haskell project, which requires that each commit in your PR compiles fine individually.

Here is an easy, automated and fast way to check it:

git rebase --interactive HEAD~~~ --exec "! grep 'error:' <(stack ghci mylibrary:lib --ghci-options='-e 1' 2>&1)"
@ladinu
ladinu / encryptedNixos.md
Last active March 1, 2024 07:19
NixOS install with encrypted /boot /root with single password unlock

Requirements

  1. Encrypt everthing including /boot and /root
  2. Enter password once
  3. Support UEFI

Installation media setup

Download NixOS minimal iso and copy to USB stick. For example on Mac OSX

$ diskutil list
$ diskutil unmountDisk /dev/disk1 # Make sure you got right device
@travitch
travitch / NotificationDaemon.hs
Created September 12, 2012 14:37
A freedesktop notification plugin for xmobar
{-# LANGUAGE OverloadedStrings, RankNTypes, KindSignatures, FlexibleContexts #-}
module Plugins.NotificationDaemon where
-- xmobar plugin API
import Plugins
import DBus.Bus
import DBus.Client
import DBus.Constants