Skip to content

Instantly share code, notes, and snippets.

trolling craigslist for free pallets

Chris Martin chris-martin

trolling craigslist for free pallets
View GitHub Profile
chris-martin /
Last active Jun 7, 2020
How to install NixOS from an Ubuntu liveCD

Standardized Ladder of Functional Programming

The LambdaConf Ladder of Functional Programming (LOFP) is a standardized progression of different concepts and skills that developers must master on their journey to becoming expert-level functional programmers. LOFP can be used to rank workshops, talks, presentations, books, and courseware, so that aspiring functional programmers have a better understanding of what material is appropriate for them given their current experience.

Fire Keramik


  • Immutable Data
  • Second-order Functions
View run.nix
{ coreutils, writeShellScript, lib, system, glibcLocales }:
rec {
inherit (builtins) derivation;
inherit (lib) concatMapStringsSep;
standardBuildInputs = [ coreutils ];
locale = { LC_ALL = "en_US.UTF-8"; LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; };
chris-martin / build.gradle
Created Jul 31, 2015
Method for launching a Scala REPL for a Gradle project.
View build.gradle
task classpath << { println sourceSets.main.runtimeClasspath.asPath }
#! /usr/bin/env bash
set -eufo pipefail
nix-shell --pure --run 'ghcide --lsp'
View bracket-fork.hs
import Control.Exception.Safe
import Control.Concurrent
:: IO resource
-- ^ The first action; will run in the current thread
-> (resource -> IO a)
-- ^ A final action that runs in the forked thread, with async exceptions masked
-> (resource -> IO b)
-- ^ Action that runs in the forked thread, with async exceptions unmasked
View chris-martin-nginx.nix
services.nginx = {
enable = true;
appendHttpConfig = ''
types {
text/html html;
text/css css;
text/xml xml rss;
image/gif gif;
chris-martin / default.nix
Last active Apr 15, 2019
LaTeX + Nix setup for "Finding Success and Failure in Haskell"
View default.nix
pkgs =
import (import ./nixpkgs.nix) {};
texlive =
import ./texlive.nix { inherit (pkgs) texlive; };
fontsForLatex =
{ name = "google-fonts";
View triangles.txt
Let a, b, c be the triangles, smallest to largest.
Observations from the illustration about the relative triangle sizes:
side b = 2 * height a [observation ab]
side c = 2 * height b [observation bc]
Let w be the rectangle's width and let h be its height.
View IfThenElse.hs
{-# LANGUAGE LambdaCase #-}
import Prelude (Bool (True, False), Monad, (>>=))
ifThenElseM :: Monad m => m Bool -> m a -> m a -> m a
ifThenElseM cond ifTrue ifFalse =
cond >>= \case { True -> ifTrue; False -> ifFalse }
ifThenElseM' :: Monad m => [(m Bool, m a)] -> m a -> m a
You can’t perform that action at this time.