Skip to content

Instantly share code, notes, and snippets.

View thoferon's full-sized avatar

Tom Feron thoferon

View GitHub Profile
@thoferon
thoferon / overlay.nix
Created February 4, 2020 06:18
haskell-nix-setup
nixpkgsSelf: nixpkgsSuper:
let
inherit (nixpkgsSelf) pkgs;
ghcVersion = "ghc865";
hsPkgs = nixpkgsSuper.haskell.packages.${ghcVersion}.override {
overrides = self: super: {
# Override ghcide and some of its dependencies since the versions on
@thoferon
thoferon / default.nix
Created February 4, 2020 06:18
haskell-nix-setup
{ pkgs ? import ../nixpkgs {} }:
let
inherit (pkgs.haskell) ghcVersion;
hsPkgs = pkgs.haskell.packages.${ghcVersion};
pkgDrv = hsPkgs.callCabal2nix "demo" ../.. {};
haskellDeps = pkgDrv.getBuildInputs.haskellBuildInputs;
ghc = hsPkgs.ghcWithHoogle (_: haskellDeps);
@thoferon
thoferon / shell.nix
Created February 4, 2020 06:19
haskell-nix-setup
let
nixpkgs = import ./nixpkgs.nix {};
inherit (nixpkgs) pkgs;
haskell = import ./haskell { inherit pkgs; };
in
pkgs.mkShell {
buildInputs = with pkgs; [
@thoferon
thoferon / shell.nix
Created February 4, 2020 06:19
haskell-nix-setup
import nix/shell.nix
@thoferon
thoferon / hie.yaml
Created February 4, 2020 06:20
haskell-nix-setup
cradle:
multi:
- path: .
config:
cradle:
cabal:
component: lib:demo
# Not supported by ghcide yet.
- path: Main.hs
@thoferon
thoferon / fips-zip.js
Created May 18, 2020 17:05
ZIP to FIPS in an inefficient but compact way
(function () {
var fipsZips = {"01001":["36003","36008","36068"],"01003":["36507","36511","36526","36527","36530","36532","36533","36535","36536","36542","36547","36549","36550","36551","36555","36559","36561","36564","36567","36574","36576","36577","36578","36579","36580"],"01005":["36017","36048","36072"],"01007":["35074"],"01009":["35013","35049","35097"],"01011":["36031"],"01013":["36015"],"01015":["36201","36202","36204","36205","36206","36250","36253","36254","36257","36265","36271","36277","36279"],"01017":["36855","36862","36863"],"01019":["35960","35973","36275"],"01021":["35045","35085","35171","36790"],"01023":["36908","36910","36913","36915","36916","36919","36921"],"01025":["36436","36446","36451","36524","36540","36545","36727"],"01027":["36251","36267"],"01029":["36261","36262","36269","36273"],"01031":["36346","36351"],"01033":["35646","35660","35661"],"01035":["36454","36473"],"01037":["35183"],"01039":["36038","36455","36476"],"01043":["35055","35056","35057","35070","35077","35083"],"01045"