I hereby claim:
- I am msassak on github.
- I am msassak (https://keybase.io/msassak) on keybase.
- I have a public key ASAjH89ED49tJq0n3SVB4nLP0y08oTs2wQC-JDEtM8UfsQo
To claim this, I am signing this object:
| (deftest test-with-spy | |
| (let [state (atom []) | |
| spy (fn [& args] (swap! state into (vec args)))] | |
| (with-redefs [foo.bar.ns/side-effecting-fn spy] | |
| (fn-that-calls-side-effecting-fn :foo 1 {:whatever "hi"})) | |
| (is (= [:foo 1 {:whatever "hi"}] @state)))) |
| (ns demo | |
| (:require [clojure.core.async :as a :refer [go | |
| go-loop | |
| chan | |
| >! | |
| <! | |
| close]])) | |
| (defn int-producer | |
| "Return a channel containing the integers from 0 to n. |
| #!/usr/bin/env escript | |
| -define(dbg(X), io:format("DEBUG: ~p~n", [X])). | |
| -record(args, {primitives = [], | |
| patha = [], | |
| pathz = [], | |
| unrecognized = [], | |
| verbose = false, | |
| help = false}). |
I hereby claim:
To claim this, I am signing this object:
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |