This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
host="functional.cafe" | |
now="$(date -u '+%a, %d %b %Y %H:%M:%S GMT')" | |
published="$(date -u +'%FT%R:%SZ')" | |
doc=$(cat <<EOF | |
{ | |
"@context": "https://www.w3.org/ns/activitystreams", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uses: | |
* https://github.com/sos4nt/dynamic-colors | |
* A simple script to switch all active terminals: https://github.com/sos4nt/dynamic-colors/issues/12 | |
* feh to switch bg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/terrain.o src/terrain.d : src/terrain.c src/terrain.h src/geometry.h src/common.h \ | |
src/buffer.h src/gl.h src/util.h src/vec3.h src/mat4.h src/delaunay.h \ | |
src/perlin.h src/poisson.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
pkg-json = lib.importJSON /var/git/project/deploy.json; | |
pkg = (import (pkgs.fetchgit pkg-json) {}).package; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packageOverrides = super: { | |
haskellPackages = super.haskellPackages.override { | |
overrides = { | |
some-pkg = pkgs.haskell.lib.overrideCabal super.some-pkg (orig: { | |
src = fetchFromGithub {}; | |
}); | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell -i racket -p racket | |
#lang racket | |
(require racket/pretty) | |
(define (pretty-write-all) | |
(define next (read)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- stack script --nix --resolver lts-10.9 | |
--package streaming | |
--package amazonka | |
--package amazonka-s3 | |
--package amazonka-core | |
--package bytestring | |
--package resourcet | |
--package conduit | |
--package conduit-combinators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | age | interest | age2 | age3 | |
---|---|---|---|---|---|
bill | 29 | bitcoin | 29 | 29 | |
vanessa | 33 | wine | 33 | 33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1..4 | |
ok 1 - scalar division | |
ok 2 - scalar multiplication | |
not ok 3 - multiply 1 BTC to the smallest unit | |
# | |
# got '0 msat', expected '1 msat' | |
# | |
ok 4 - lots of msats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open FParsec.Primitives | |
open FParsec.CharParsers | |
type CsvResult = { IsSuccess : bool; ErrorMsg : string; Result : string list list } | |
// Some simple helpers | |
let isWs s = Seq.map (isAnyOf "\t ") s | |
|> Seq.reduce (&&) | |
let ws = spaces |