Skip to content

Instantly share code, notes, and snippets.

@proger
proger / newrelic.hs
Last active January 24, 2016 22:40
debug servant-client requests
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE StandaloneDeriving #-}
module Realm.Newrelic where
import Control.Monad.Trans.Either
import Data.Proxy
@4z3
4z3 / env.nix
Last active August 29, 2015 14:09
nix development environment example
# usage:
# nix-env -f env.nix -i
# load-env-example-1
#
# If the directory ~/.history/ exists, then the development environment
# will use a dedicated shell history.
#
# Note: this is currently only compatible with nixos-14.11 (nixos-unstable).
#
@soenkehahn
soenkehahn / gist:b1beb4f32d54cc177f9c
Last active August 29, 2015 14:08
nix: use specific revision of servant
let
filterHaskellSource = builtins.filterSource (path: type:
type != "unknown" &&
baseNameOf path != ".git" &&
baseNameOf path != "result" &&
baseNameOf path != "dist");
in
{ pkgs ? import <nixpkgs> { }
, src ? filterHaskellSource ./.
}:
@4z3
4z3 / nix-haddock-index.sh
Last active September 4, 2019 06:54
nix-haddock-index.sh
#! /bin/sh
set -euf
# TODO NIX_GHC=$(type -P ghc) NIX_GHC_DOCDIR=$(dirname $(dirname $(type -P ghc)))/share/doc/ghc/html
# if unset: this is for e.g. emse-hdsb
main() {
pkg=$(dirname $(dirname $NIX_GHC))