Skip to content

Instantly share code, notes, and snippets.

View aew's full-sized avatar

Edward Wible aew

View GitHub Profile
{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"height": 400,
"padding": 5,
"signals": [{
"name": "chartWidth",
"value": 300
},
{
@aew
aew / gist:1bfa657743caa025e28d4fe83516c81d
Last active October 6, 2016 20:59
graphql-clj parsed statements - after
[{:operation-definitions
[{:section :operation-definitions,
:operation-type {:type "query"},
:selection-set
[{:node-type :field,
:field-name "user",
:arguments
[{:node-type :argument, :argument-name "id", :value 4}],
:selection-set
[{:node-type :field, :field-name "id"}
@aew
aew / gist:362da62a1cb949436a62f865118f83c6
Last active October 6, 2016 20:59
graphql-clj parsed schemas - after
[{:type-system-definitions
[{:node-type :type-definition,
:type-name "Person",
:section :type-system-definitions,
:fields
[{:node-type :type-field, :field-name "name", :type-name "String"}
{:node-type :type-field, :field-name "age", :type-name "Int"}
{:node-type :type-field,
:field-name "picture",
:type-name "Url"}],
@aew
aew / gist:9a8508da64c03a8f26157de27ead9534
Created October 6, 2016 18:20
graphql-clj parsed statements - before
[{:operation-definitions
({:type :operation-definition,
:operation-type {:type "query"},
:selection-set
[{:selection
{:field
{:name "user",
:arguments {"id" {:value 4}},
:selection-set
[{:selection {:field {:name "id"}}}
@aew
aew / gist:d7ebe142283d37585761fdd859445f11
Created October 6, 2016 18:19
graphql-clj parsed schemas - before
[{:operation-definitions (),
:type-system-definitions
({:type-system-type :type,
:type-name "Person",
:fields
{"name" {:type-name "String"},
"age" {:type-name "Int"},
"picture" {:type-name "Url"}},
:type :type-system-definition,
:kind :OBJECT}),
@aew
aew / double_entry_invariants.clj
Last active March 14, 2018 21:55 — forked from lucascs/invariants.clj
Double entry modeling
(def billing-violations [negative-entries small-minimum-payment prepaid-mutual])
(def loss-violations [credit-loss pre-loss])
(def general-violations [minimum-payment-mutual])
(defn all-violations [balances]
(concat billing-violations loss-violations general-violations))
(s/defn fixing-invariants :- [Entry] [initial-balances :- Balances, new-entries :- [Entry]]