- 3 l vatten
- 5 tsk grönt, rött eller svart te (viktigt att det inte har smaksättning)
- 2 dl rårörsocker
- Bär eller fruktpuré (helst syrligt, typ hallon)
- 2 st smala glasbehållare, 1,5-2,0 l (tips är 3-litersburkar från Cordon Bleu)
- Bomullstyg (t.ex. gammalt lakan)
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 kc.datomic | |
"Datomic utility functions | |
Usage Notes: | |
Some functions in this namespace take sequences of facts and return them modified in some way. Some up-front modifications are useful for those functions, like replacing all map-form facts with vector-form facts. In order to avoid doing these modifications repeatedly to same the same set of facts (which would be harmless but wasteful), two versions of these functions exist: a \"safe\" version that does those up-front modifications, and an \"unsafe\" version that expects those modifications to already have been performed. The unsafe versions are named like the safe ones, but with a single quote appended. | |
TODO: | |
- consider implementing all fns that branch based on operation as multimethods | |
These fns mostly support :db/add, :db/retract :db.fn/retractEntity, :db.fn/cas, |
This file has been truncated, but you can view the full file.
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
2020-04-06 18:51:31.333 DEBUG default com.amazonaws.AmazonWebServiceClient - Internal logging succesfully configured to commons logger: true | |
2020-04-06 18:51:31.432 DEBUG default c.a.internal.config.InternalConfig - Configuration override awssdk_config_override.json not found. | |
2020-04-06 18:51:31.570 DEBUG default com.amazonaws.metrics.AwsSdkMetrics - Admin mbean registered under com.amazonaws.management:type=AwsSdkMetrics | |
2020-04-06 18:51:31.621 INFO default datomic.slf4j.bridge - SLF4J Bridge installed | |
2020-04-06 18:51:31.633 INFO default datomic.transactor - {"datomic.metricsCallback" clojure.core/identity, :tid 21, "datomic.printConnectionInfo" true, "datomic.txTimeoutMsec" 10000, "datomic.indexWorkDir" #object[java.io.File 0x73fb5bd0 "data/indexer"], "datomic.heartbeatIntervalMsec" 5000, "datomic.memoryIndexThreshold" 33554432, "datomic.versionUnique" "5544", "datomic.objectCacheMax" 134217728, "datomic.allowLogOverlap" false, "datomic.readAheadPool" 18, "datomic.version" "0.9.5544", :pi |
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
;; transact a db-fn using io.pedestal.log, but forget to add require! | |
user> (d/transact conn [{:db/id (d/tempid :db.part/user) | |
:db/ident :some-dbfn | |
:db/fn (d/function | |
'{:lang "clojure" | |
:params [db params] | |
:code (io.pedestal.log/error :some-dbfn "hello")})}]) | |
#<promise$settable_future$reify__3565@738ad462: | |
{:db-before datomic.db.Db@e6de0f53, | |
:db-after datomic.db.Db@87233408, |
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 example.service-test | |
"Assuming we have a example.service returning a component system (with using... etc) | |
starts this, stops it etc." | |
(:require | |
[clojure.test :refer :all] | |
[example.service :refer :all] | |
[com.stuartsierra.component :as component]) ) | |
(defn first-free-port | |
"Returns first free ephemeral port |
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
{:db/id #db/id [db.part/user 100001] | |
:question "what is your favourite animal?" | |
:question-type :single-option ;; could actually can be deduced from the fact below | |
:single-options ;; components or something. | |
[{:answer "cat" | |
:db/id #db/id [db.part/user 100002]} | |
{:answer "dog" | |
:db/id #db/id [db.part/user 100003]} | |
{:answer "rhino" | |
:db/id #db/id [db.part/user 100004]}]} |
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 world.core | |
(:require [clojure.core.async :refer [go chan >! <! <!! put! timeout close!]])) | |
(defn apply-to-fsm | |
[[state _] event] | |
(case [state event] | |
[:init :create] [:running [:allocate :run]] | |
[:running :stop] [:stopped [:stop]] | |
[:running :start] [:running []] |
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 path-with-enlive-example | |
(:require [net.cgrand.xml :as xml] | |
[clojure.zip :as z])) | |
;; This is meant to be answer to the question | |
;; "Enlive as a hammer" posted in the enlive mailing list: | |
;; https://groups.google.com/forum/#!topic/enlive-clj/Da0l_Vpu05U | |
;; div | |
;; | :content |
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 traktor.error | |
(:require [datomic.api :as d :refer [db q]])) | |
(d/create-database "datomic:mem://casenum") | |
(def conn (d/connect "datomic:mem://casenum")) | |
;; simple schema | |
@(d/transact conn [{:db/id #db/id [:db.part/db] |
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
;; put this in ~/.emacs.d/init.el : | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t) | |
(package-initialize) |
NewerOlder