Skip to content

Instantly share code, notes, and snippets.

@behrica
behrica / cider-nrepl-auto-erase-buffer.diff
Last active November 22, 2018 14:37
cider-nrepl-auto-erase patch
--- a/cider-repl.el
+++ b/cider-repl.el
@@ -396,6 +396,21 @@ client process connection. Unless NO-BANNER is non-nil, insert a banner."
;;; REPL interaction
+(defun cider--checked-insert-before-markers (string)
+
+ (message "Currrent cider repl buffer size is: %s "(buffer-size))
(ns icy-fog
(:require 'taoensso.nippy.utils)
)
(def l (list 1))
(def ll (repeat 2 l))
;;(taoensso.nippy.utils/serializable? ll)
lm(dist ~ speed,data=cars)
@behrica
behrica / gist:d0f7d9c9e5293f0857a9
Created October 14, 2014 18:33
json output from "jsonf"
{
"coefficients": [
37.2851,
-5.3445
],
"residuals": [
-2.2826,
-0.9198,
-2.086,
1.2973,
@behrica
behrica / gist:b09d159734a48bff3c7d
Created October 7, 2014 08:01
Clojure code for freeze / unfreeze of digitalocean droplet
(defn destroy-all-images [client-id api-key image-name]
(let [imgs (filter #(= (:name %) image-name) (all-images client-id api-key))]
(doseq [img imgs] (destroy-image client-id api-key (:id img)))))
(defn freeze
[client-id api-key droplet-name]
(let [droplet-id (:id (droplet-by-name client-id api-key droplet-name))]
(if (nil? droplet-id)
[:failed (str "Droplet " droplet-name " not existing")]
(do