Skip to content

Instantly share code, notes, and snippets.

➜ make
make -C proto protoc
make[1]: Entering directory '/home/r2/code/ext/go-ipam/proto'
docker run --rm \
--entrypoint sh \
-v /home/r2/code/ext/go-ipam/proto/..:/workspace \
-w /workspace/proto \
bufbuild/buf:1.14.0 \
-c "buf format -w api/v1 && chown -R 1000:1000 /workspace"
docker run --rm \
### Keybase proof
I hereby claim:
* I am ralfonso on github.
* I am rroemmich (https://keybase.io/rroemmich) on keybase.
* I have a public key whose fingerprint is DB20 2B16 1738 5AB1 B6AE A9CE 1D49 1258 2CAD 66E2
To claim this, I am signing this object:
@ralfonso
ralfonso / gist:2898759
Created June 9, 2012 00:05
clojure cycling generator
(defn cycling-generator
[items]
(let [items-cycle (cycle items)
remaining (atom items-cycle)]
(fn []
(let [cur (first @remaining)]
(dosync
(swap! remaining rest))
cur))))
@ralfonso
ralfonso / gist:2590167
Created May 3, 2012 22:54
clojure mock
user=> (with-redefs [db/query (constantly [{:id 123 :slug "TEST THIS YO"}])] (db/query "select * from page"))
[{:slug "TEST THIS YO", :id 123}]
@ralfonso
ralfonso / gist:2493902
Created April 25, 2012 22:07
repl madness
** thejourney site dir
[rroemmich@jambalaya:~/projects/thejourney-app/site]$ lein repl
nREPL server started on port 55548
Welcome to REPL-y!
Clojure 1.3.0
Exit: Control+D or (exit) or (quit)
Commands: (help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
(use '[caribou.config :only (configure)])
(def default-config
{
:debug true
:use-database true
:halo-enabled true
:halo-prefix "/_halo"
:halo-key "9i209idfs09ugf0d9ug0fdsu09fdgis90dfgiigf0d-sgj0d9fgim,f09dgk"
:database {