Remove all unlabelled images:
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
Remove all old containers:
docker rm `docker ps -notrunc -a -q`
Disable caching of build steps with docker build -no-cache ...
(ns foo.user | |
(:require [clojurewerkz.scrypt.core :as sc])) | |
(defn calculate-hash [password salt] | |
(sc/encrypt (str password salt) 16384 8 1)) | |
(defn verify-hash [hash password salt] | |
(sc/verify (str password salt) hash)) | |
(defn verify-user-password [user password] |
;; Option 1: Return the response | |
(with-authentication state-with-auth-creds | |
clj-http.client/post | |
"http://some.url/api" | |
{:accept :json :headers {"X-foo" "bar"}}) | |
;-> {:status 200 :body "looks good"} | |
;; Option 2: Return a wrapped request method | |
(def authenticating-post | |
(with-authentication state-with-auth-creds clj-http.client/post)) |
Remove all unlabelled images:
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
Remove all old containers:
docker rm `docker ps -notrunc -a -q`
Disable caching of build steps with docker build -no-cache ...
{ "index" : { "_index" : "irc.freenode.clojure", "_type" : "message" } } | |
{ "datestamp": "2011-07-04T04:03:35", "author": "lnostdal-laptop", "message": "ring seems to mess around with stdout (*out* ?) or something .. debug output using println doesn't show up in slime here" } | |
{ "index" : { "_index" : "irc.freenode.clojure", "_type" : "message" } } | |
{ "datestamp": "2011-07-04T04:04:03", "author": "lnostdal-laptop", "message": "..and exceptions end up in the terminal; where i started `lein swank'" } | |
{ "index" : { "_index" : "irc.freenode.clojure", "_type" : "message" } } | |
{ "datestamp": "2011-07-04T04:04:20", "author": "lnostdal-laptop", "message": "..is there some way of fixing this? .. i.e. println output should end up in slime, and exceptions also" } | |
{ "index" : { "_index" : "irc.freenode.clojure", "_type" : "message" } } | |
{ "datestamp": "2011-07-04T04:05:56", "author": "hoeck", "message": "lnostdal-laptop: the server code runs in a different thread than the slime repl, and slime only redirects stdout of its |
curl -s http://www.raynes.me/logs/irc.freenode.net/clojure/2011-07-04.txt \ | |
| sed -r 's/\\/\\\\/g' | sed -r 's/"/\\"/g' \ | |
| sed -r 's/^\[([^\]+)\] ([^:]+): (.*)$/{ "index" : { "_index" : "irc.freenode.clojure", "_type" : "message" } }\n{ "datestamp": "2011-07-04T\1", "author": "\2", "message": "\3" }/' |
Shown at Feb '14 Den of Clojure
So you've read the blogs and thought how fun it would be to write web front ends with your favorite lisp. Perhaps you've even fired up the repl and done a little playing. But how do you get from there to a
Two terminal windows open, one with a bunch of long running watch tasks, the other with an editor. Each of the terminals is a view into one of two windows in a tmux session. Useful for having a vertically split screen with editor on right, and switching between a browser and other command windows on the left.
In first terminal:
tmux new-session -s first
tmux rename-window editor
emacs
or whateverIn second terminal:
tmux new-session -t first -s second
Keep the mnemonics in mind...