# replace api-token with actual token from ~/.config/asciinema/config
curl -v -X POST -u $USER:api-token -F asciicast=@/path/to/recording.json
View poolboy_demo.ex
defmodule HttpRequester do
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, nil, [])
def fetch(server, url) do
# Don't use cast:
timeout_ms = 10_000
View cleanup-input-stream.clj
(ns example
(defn cleanup-input-stream
"InputStream wrapper which calls given callback after
the stream is closed."
[is cleanup]
(proxy [FilterInputStream] [is]
(close []
(proxy-super close)
View streams.clj
(ns cheshire.experimental
(:require [cheshire.core :refer :all]
[ :refer :all])
(:import ( ByteArrayInputStream FilterInputStream
(defn escaping-input-stream
(let [new-is (proxy [FilterInputStream] [is]

Naive micro-benchmark of reduce/sum I made to get the idea of raw performance range of different dynamic languages / different runtimes.

For each of these I repeated the execution until the timing stopped changing in major way (JIT etc), and saved only the last run.

Don't take it too seriously ;)

View asciinema-theme-monokai.css
/* Based on Monokai from base16 collection - */
.asciinema-theme-monokai .asciinema-terminal {
color: #f8f8f2;
background-color: #272822;
border-color: #272822;
.asciinema-theme-monokai .fg-bg {
color: #272822;
.asciinema-theme-monokai .bg-fg {
View danny.datalog
[:find ?actor
[?d :person/name "Danny Glover"]
[?d :person/born ?danny-age]
[?a :person/name ?actor]
[?a :person/born ?actor-age]
[?m :movie/cast ?a]
[(< ?actor-age ?danny-age)]]
View web-controllers-doc_controller.ex
defmodule Asciinema.DocController do
use Asciinema.Web, :controller
def show(conn, _params) do
|> put_layout(:docs)
|> render("show.html")
View gist:413c68c9edf85d5af96a
nREPL: Establishing direct connection to localhost:32323 ...
nREPL: Direct connection established
Connected. Clojure isn't a language, it's a building material.
Error in `cider-repl--state-handler': (void-function seq-find)
error in process filter: Symbol's function definition is void: seq-find [2 times]
View split-coll.cljs
(defn split-coll [elem coll]
(loop [coll coll
parts []
part []]
(if-let [e (first coll)]
(if (= e elem)
(recur (rest coll) (conj parts part) [])
(recur (rest coll) parts (conj part e)))
(if (seq part)
(conj parts part)