Skip to content

Instantly share code, notes, and snippets.

View kardan's full-sized avatar

Daniel Sunnerek kardan

View GitHub Profile
@kardan
kardan / example.clj
Created January 25, 2018 13:39
Lumen stats
View example.clj
(ns akvo.lumen.admin.stats.example
(:require [cheshire.core :as json]
[clojure.pprint :refer [pprint]]))
(comment
;; # 1 Get list of tenants on form "tenant1,tenant2,..."
;; $ docker exec -i -t akvolumen_backend_1 env ENCRYPTION_KEY=... KC_URL=... KC_SECRET=<SECRET> PG_HOST=... PG_DATABASE=... PG_USER=... PG_PASSWORD=... lein run -m akvo.lumen.admin.stats.run-manager-query "SELECT label from tenants;" > tenants.edn
;; Now massage the contents of tenants.edn Replace " with \" and put the list
View gist:48f87f9fdbd05483d6718640e1443dec
lumen_tenant_1=> \d+ visualisation
Table "public.visualisation"
Column | Type | Modifiers | Storage | Stats target | Description
------------+--------------------------+---------------+----------+--------------+-------------
id | text | not null | extended | |
dataset_id | text | | extended | |
name | text | not null | extended | |
type | text | not null | extended | |
spec | jsonb | not null | extended | |
author | jsonb | | extended | |
@kardan
kardan / keybase.md
Last active September 23, 2015 09:01
View keybase.md

Keybase proof

I hereby claim:

  • I am kardan on github.
  • I am kardan (https://keybase.io/kardan) on keybase.
  • I have a public key whose fingerprint is 1B66 06D0 C05F F4C5 30EA 08C3 4784 36FA C87B A40C

To claim this, I am signing this object: