Skip to content

Instantly share code, notes, and snippets.

@tgk
tgk / quilt_proposal.edn
Created May 14, 2014 20:55
An attempt at understanding Quilt
;; These notes describe the snapshots of a shared state between
;; pariticipants in a system co-ordinated using CRDT methods, hopefully
;; matching the Quilt notes from @cemerick at
;; http://writings.quilt.org/2014/05/12/distributed-systems-and-the-end-of-the-api/
;; The ambition is to built systems where network failures, replays
;; etc. can be safely ignored (instead of just being ignored).
;; Maintaining the "timestamps" for the append only database is the only
;; thing I feel I don't grok. There are some notes at the end of the
;; gist. Hoping for feedback or pointers!
@tgk
tgk / gist:ff513c551981cff34dcaa0e833fcb62a
Created May 17, 2016 13:59
Tilfældigheder og trommer
## Tilfældigheder
## Vi kan printe ting ud til skærmen med "puts"
# puts "Hejsa"
## Det kan vi bruge til at undersøge funktioner
## "rand" giver os et tilfældigt kommatal mellem 0 og 1:
# puts rand
@tgk
tgk / core.clj
Created December 17, 2013 17:45
Proposal for Riemann/Compojure routing integration
(ns compojure-augmented.core
(:require [compojure.core]))
(def bare
(compojure.core/GET
"/foo/:bar" [bar]
{:status 200
:body (str "Hello " bar)}))
(bare
@tgk
tgk / README.md
Last active December 23, 2015 16:09
Christmas tree dashboard

A simple Riemann dashboard design with functionality similar to the grid layout from Riemanns built in dashboard.

@tgk
tgk / index.html
Created September 19, 2013 12:50
Animating date axis
<!DOCTYPE html>
<meta charset="utf-8">
<style>
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript">
var width = 960,
@tgk
tgk / README.md
Created September 15, 2013 10:26
Propagator values illustration

First prototype of propagator values over time for presentation.

@tgk
tgk / README.md
Created July 20, 2013 07:56
Demographic treemap with tooltip

Demographics treemap with population distribution and revenue obtained from that demographic associated with each node. The (fictitious) demographics data is loaded from a CSV file, whereas the revenue data is randomly generated.

@tgk
tgk / README.md
Created July 17, 2013 11:46
Voronoi diagram for British outbound postcodes

Voronoi diagram for British outbound postcodes. The voronoi function breaks when the data points close to each other are not removed.

@tgk
tgk / README.md
Last active December 19, 2015 20:19
Projection of all British outbound postcodes

Projection of all British outbound postcodes (also known as "the bit before the space")

@tgk
tgk / gist:5947386
Created July 8, 2013 09:14
Iterate over filenames and execute command in bash
for f in ~/dir/*.txt; do bin/do_thing $f; done