- Start the ui (see script), open UI window
- Download the reset.sh and run it
- get the url for the guestbook, open UI window
- Show off resiliance by killing pods in the UI, after 5 kills the quorum is lost See this gist for details why
- When it inevitably loses quorum, run reset.sh again.
This file contains hidden or 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
module Fin | |
-- Defined Vect and Fin datastructures as described in | |
-- "idris, a general purpose dependently typed programming language: | |
-- design and implementation" | |
data Vect: Nat -> Type -> Type where | |
Nil : Vect Z a | |
(::) : a -> Vect k a -> Vect (S k) a | |
data Fin : Nat -> Type where | |
fZ : Fin (S k) |
This file contains hidden or 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
with import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/a211c1752ce3f6b017edefda49c1c8102a7ce812.tar.gz") {}; | |
{ | |
env = stdenv.mkDerivation { | |
name = "env"; | |
buildInputs = with pkgs; [rustcNightlyBin.rustc cargo]; | |
}; | |
} |
This file contains hidden or 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 ruby | |
# (C) 2017 Maarten Hoogendoorn <[email protected]> | |
# Released under the GPL3.0 | |
# | |
# This script finds the runtime closure of programs, and tries to find the correct license for it. | |
# Given that the mapping of store paths -> nix expressions does not exist, it guesses the package | |
# name and aborts if this guess is wrong. | |
require "json" |
This file contains hidden or 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
with (import <nixpkgs> {}); | |
with pkgs.lib; | |
let | |
getLicense = meta: | |
if !(meta ? license) then | |
"not specified" | |
else | |
if (meta.license ? fullName) | |
then meta.license.fullName | |
else |
This file contains hidden or 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
with (import <nixpkgs> {}); | |
let | |
v_old_1 = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/archive/${sha1}.tar.gz) {}.; | |
v_old_2 = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/archive/${sha1}.tar.gz) {}.; | |
v_old_3 = import (builtins.fetchTarball https://github.com/nixos/nixpkgs/archive/${sha1}.tar.gz) {}.; | |
in | |
{ | |
myPackage = stdenv.mkDerivation rec { | |
name = "different-editor-versions"; | |
buildInputs = [v_old1.emacs v_old2.vi]; |
This file contains hidden or 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
let | |
myGenerator = stdenv.mkDerivation { | |
name ="yadda"; | |
phases ="meh"; | |
meh = '' | |
mkdir $out | |
generateSomeNix > $out/generated.nix | |
''; | |
}; | |
in |
This file contains hidden or 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
#usage: | |
# nix-instantiate --arg maintainer "\"Matthias Beyer <[email protected]>\"" --strict --json --eval ./all-packages-of-a-maintainer.nix | $(nix-build '<nixpkgs>' -A jq)/bin/jq | |
with (import <nixpkgs> {}); | |
with lib; | |
{ maintainer }: | |
let | |
filter = k: v: | |
let |
This file contains hidden or 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
{ stdenv, callPackage, which, lessc, nodejs}: | |
let | |
jsPackage = (callPackage ./js {}).package; | |
desktopPackage = (callPackage ./desktop {}).package; | |
in rec { | |
# turtle = stdenv.mkDerivation { | |
# name = "turtle-desktop"; | |
# buildInputs = [ nodejs which lessc jsPackage]; | |
# src = "${jsPackage}/lib/node_modules/turtl-js"; |
This file contains hidden or 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
[maarten@maarten-laptop:~]$ nix-repl | |
Welcome to Nix version 1.11.4. Type :? for help. | |
nix-repl> hostname = "aaa" | |
nix-repl> hostname == "aaa" | |
true | |
nix-repl> |