- 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)
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
(function() { | |
var jQuery = window.$; | |
var OpenRegister = function(endpoint) { | |
this.endpoint = endpoint; | |
}; | |
OpenRegister.prototype.buildURL = function(path) { | |
return this.endpoint + path + ".json"; | |
}; |
Setting up a standalone mapit instance is documented at http://mapit.poplus.org/docs/self-hosted/install/ but there are some issues. This summarizes what I needed to do:
# install postgis
Country names (published by Permanent Committee on Geographical Names): https://www.gov.uk/government/publications/country-names
FCO Geographical Names Index - country names and descriptive terms (published by FCO): https://www.gov.uk/government/publications/geographical-names-and-information
World locations: https://www.gov.uk/government/world
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
(ns tarai.core | |
(:use [overtone.live]) | |
(:use [clojure.algo.monads :only [state-t cont-m run-cont domonad]])) | |
(def m (metronome 400)) | |
;; basic.clj より | |
(defsynth foo [freq 200 dur 0.5] | |
(let [src (saw [freq (* freq 1.01) (* 0.99 freq)]) | |
low (sin-osc (/ freq 2)) |
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
(ns examples.coordination | |
(:use [overtone.live] | |
[overtone.inst.synth]) | |
(:require [polynome.core :as poly])) | |
;;ping | |
(def m (poly/init "/dev/tty.usbserial-m64-0790")) | |
(poly/on-press m (fn [x y s] |
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
(ns polynome-satie.core | |
(:use [clojure.core.match :only [match]] | |
[polynome core launchpad] | |
[overtone.live] | |
[overtone.inst sampled-piano])) | |
;;Erik Satie Gnossienne No. 1 | |
(def phrase1a [:v :vii :vi# :v :v :iv# :v :iv#]) | |
(def phrase1b [:v :vii :vi# :v :vii# :i+ :vii# :i+]) | |
(def phrase1c [:v :vii :vi# :v :v :iv# :iii :ii :i :ii :i :ii :iii :ii :ii :i]) |
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
(ns definst2.core | |
(:use [overtone.core])) | |
(defmacro definst* [name params & form] | |
(let [cgen-name (symbol (str name "-cgen")) | |
param-list (partition 2 params) | |
cgen-params (vec (mapcat (fn [[name default-val]] [name {:default default-val :doc ""}]) param-list))] | |
`(do | |
(definst ~name ~params ~@form) | |
(defcgen ~cgen-name ~cgen-params |
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
# So the problem is inserting data into neo using the batch API. So we have a bunch of people and we want to put them into the graph and also | |
# add to to the index so that we can search for them. | |
# The way the batch API works is that you can refer to previous commands by referencing their index in the list of commands (zero indexed) | |
# e.g. if I want to reference the person added in the first command I would reference that node as {0} | |
# You should be able to see how that works in the code below. | |
neo_people_to_load = Set.new | |
neo_people_to_load << { :name => "Mark Needham", :id => 1 } | |
neo_people_to_load << { :name => "Jenn Smith", :id => 2 } | |
neo_people_to_load << { :name => "Chris Ford", :id => 3 } |
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/ruby | |
require 'socket' | |
HOSTNAME = `facter hostname`.chomp | |
SOCKET = UDPSocket.new | |
IO.popen(["curl","http://localhost:8000/haproxy;csv"]) do |haproxy_csv| | |
header_line = haproxy_csv.gets | |
header_line.gsub!(/# /,'') | |
HEADERS = header_line.split(/,/)[0..-2] |