Skip to content

Instantly share code, notes, and snippets.

@tgk
tgk / README.md
Created September 15, 2013 10:26
Propagator values illustration

First prototype of propagator values over time for presentation.

@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
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 / 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
(ns user
(:require [schema.core :as s]
[schema.utils :as s-utils]))
(defn filter-walker
"Creates a walker which replaces sub-trees in values of maps with nil
if they do not conform to schema."
[schema]
(s/start-walker
(fn [schema]
@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 / data.tsv
Created July 21, 2014 08:26
Adapted line chart
date close
1-May-12 0.114
27-Apr-12 0.12
@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 / spec_test.clj
Created September 12, 2016 12:33
A very small script for running spec tests. I have a lein alias for running the main function and that works quite well.
(ns spec-test
(:require [clojure.pprint]
[clojure.spec.test]
[clojure.tools.namespace.repl :refer (refresh)]))
(defn run-analysis
[]
(clojure.spec.test/instrument)
(let [results (clojure.spec.test/check)
failures (remove (comp true? :result :clojure.spec.test.check/ret) results)]
http://static.boredpanda.com/blog/wp-content/uploads/2015/01/magic-realism-paintings-rob-gonsalves-100.jpg
https://twistedsifter.files.wordpress.com/2012/04/adding-monsters-to-thrift-store-landscape-paintings-chris-mcmahon-2.jpg?w=800&h=644
http://static.boredpanda.com/blog/wp-content/uploads/2014/07/re-directed-paintings-david-irvine-gnarled-branch-9.jpg
https://static1.squarespace.com/static/52784cdde4b07cdbb003018f/537abe38e4b0ff62ffbb6786/56036d26e4b008bd0ad827f0/1443065129884/Cat-in-Window-Painting-HOME.jpg
http://gohighbrow.com/wp-content/uploads/2015/03/paintings1.jpg
http://static.boredpanda.com/blog/wp-content/uuuploads/colorful-paintings-leonid-afremov/colorful-paintings-leonid-afremov-17.jpg
http://www.thisiscolossal.com/wp-content/uploads/2016/03/finger-4.jpg
http://webneel.com/daily/sites/default/files/images/daily/01-2014/4-indian-gandhi-paintings.preview.jpg
https://afremov.com/image.php?type=P&id=17833
http://static.boredpanda.com/blog/wp-content/uploads/2015/11/pop-culture-characters-thrift-s