Skip to content

Instantly share code, notes, and snippets.

View philandstuff's full-sized avatar

Philip Potter philandstuff

View GitHub Profile
@philandstuff
philandstuff / README.org
Last active August 29, 2015 14:20
spike

datomic-spike

A spike into using datomic to model data registers.

Usage

You need Datomic. If you agree to the Datomic Free License you can install it using homebrew: brew install datomic.

analysis

2015-05-19T14:12:14.514559+00:00 app[web.1]: [error] c.j.b.ConnectionHandle - Database access problem. Killing off this connection and all remaining connections in the connection pool. SQL State = 57P01
2015-05-19T14:12:14.762639+00:00 app[web.1]: [error] application -
2015-05-19T14:12:14.762643+00:00 app[web.1]:
2015-05-19T14:12:14.762646+00:00 app[web.1]: ! @6m7idhci3 - Internal server error, for (GET) [/] ->
2015-05-19T14:12:14.762647+00:00 app[web.1]:
2015-05-19T14:12:14.762651+00:00 app[web.1]: play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.RuntimeException: org.postgresql.util.PSQLException: FATAL: terminating connection due to administrator command]]
2015-05-19T14:12:14.762653+00:00 app[web.1]: at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-19T14:12:14.762655+00:00 app[web.1]: at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-19
@philandstuff
philandstuff / data-model.org
Created June 1, 2015 11:09
data modelling for registers

data model

needs

  • fetch a particular version of a record (permalink)
  • fetch the latest version of a record
  • view all (current) records
  • export whole register inc history
  • export last N versions of history
    • update my local copy of register with changes (streaming)
(function() {
var jQuery = window.$;
var OpenRegister = function(endpoint) {
this.endpoint = endpoint;
};
OpenRegister.prototype.buildURL = function(path) {
return this.endpoint + path + ".json";
};
@philandstuff
philandstuff / standalone-mapit.org
Last active August 29, 2015 14:23
standalone mapit experience
@philandstuff
philandstuff / lists-of-countries.md
Created September 1, 2015 11:20
Lists of countries and geographical locations
@philandstuff
philandstuff / codemesh2015.org
Last active November 16, 2015 19:37
Code mesh 2015 notes

Kush, an introduction to schedulers

about me

  • I work for GDS
  • Cabinet Office
  • we started by building GOV.UK
    • replaced older sites like direct gov, business link
  • we’re not just fixing websites
    • we also build and run digital services
    • working with depts across the country
    • eg: register to vote
@philandstuff
philandstuff / minimal-ct-nix.md
Last active December 14, 2015 11:05
Deploying certificate-transparency to a docker container using nix

Deploying certificate-transparency to a docker container using nix

On the nixos/nix docker container

Fisrt, download and run the nixos/nix image:

docker run -ti nixos/nix /bin/sh

Subscribe to the nixos channel (eventually, certificate-transparency will be available on the nixpkgs channel too but as of 2015-12-14 it's not):

@philandstuff
philandstuff / foo.sh
Last active January 10, 2016 22:12
building docker images from nix packages
nix-build -E '<nix-expr>'
@philandstuff
philandstuff / cfgmgmtcamp2016.org
Last active August 27, 2018 09:11
configuration management camp 2016 notes