I hereby claim:
- I am jgdavey on github.
- I am joshuadavey (https://keybase.io/joshuadavey) on keybase.
- I have a public key ASC8tdiHKKv4NE6qgIYzZDyVegyL9IrqEoKXxomWczwAuwo
To claim this, I am signing this object:
;; Install boot. | |
;; In the same folder as this file, run: | |
;; boot -d com.datomic/datomic-free:0.9.5404 -r $PWD repl | |
(ns scratch | |
(:require [datomic.api :as d])) | |
(d/create-database "datomic:mem://scratch") | |
(def conn (d/connect "datomic:mem://scratch")) | |
(def schema |
I hereby claim:
To claim this, I am signing this object:
(ns expiry-chan | |
(:require [clojure.core.async :as async :refer [go >! <! chan]])) | |
(defn expiry-chan [in max-age-millis] | |
(let [middler (chan 1024 (map #(vector (System/currentTimeMillis) %))) | |
out (chan)] | |
(async/pipe in middler) | |
(go (loop [] | |
(if-let [[ts value] (<! middler)] | |
(do |
function! s:brepl(remove) abort | |
if a:remove | |
call fireplace#platform().piggieback("", 1) | |
echo "Piggieback connection removed" | |
else | |
let form = '(do ' . | |
\ '(require ''adzerk.boot-cljs-repl)' . | |
\ '(let [env (adzerk.boot-cljs-repl/repl-env)]' . | |
\ ' (Thread/sleep 100)' . | |
\ ' env))' |
Vim is a powerful text editor. Clojure is a powerful programming language. While its been possible to edit Clojure code in vim for years, the toolchain has improved greatly over the past year. Today we're going to see how we can integrate vim with our Clojure REPL environment.
In a shell session, let's fire up a Clojure REPL. I'm going to use lein repl
to do this. In another shell session, let's start vim and edit a
clojure file.
{ | |
"*" : { | |
"start" : "lein repl", | |
}, | |
"src/*.clj": { | |
"command": "namespace", | |
"alternate": "test/{}_test.clj", | |
"template": "(ns {dot|hyphenate})\n\n" | |
}, | |
"test/*_test.clj": { |
(use 'clojure.test) | |
(deftest tracing-paths | |
(testing "trace-paths" | |
(is (= (trace-paths {:a nil} :a) | |
[[:a]])) | |
(is (= (trace-paths {:a #{:b} | |
:b nil} :a) |
#!/usr/bin/env bash | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "ERROR: You have a dirty working copy. This command would remove any files not already checked in" | |
exit 1 | |
fi | |
log() { | |
if [ -z "$quiet" ]; then | |
echo |
#!/bin/bash | |
set -e | |
USAGE="Usage: $0 [ip_address | reset]" | |
if [ "$#" == "0" ]; then | |
echo "$USAGE" | |
exit 1 | |
fi |
[alias] | |
add-untracked = !"git status --porcelain | awk '/\\?\\?/{ print $2 }' | xargs git add" |