I hereby claim:
- I am jeroenvandijk on github.
- I am jeroenvandijk (https://keybase.io/jeroenvandijk) on keybase.
- I have a public key whose fingerprint is EABD B08B 7E40 0750 54C2 9F31 1BDC C90E A3CA BA2D
To claim this, I am signing this object:
(defn get-free-port [] | |
(with-open [socket (java.net.ServerSocket. 0)] | |
(.getLocalPort socket))) |
(ns malli.inline-output | |
(:require | |
[edamame.core :refer [parse-string]] | |
[malli.core :as m] | |
[malli.error :as me])) | |
;; -- helper code to find location data in an edn file | |
(defprotocol IUnwrap | |
(unwrap [_])) |
;; When middleware comes with a certain dependency order things get a bit tedious and error prone. | |
;; Consider example 1 below: | |
(defn add-cmd [req cmd] | |
(update req :cmd (fnil conj []) cmd)) | |
(defn add-cmd-handler [cmd] | |
(fn [req] |
;; Copy of https://gist.github.com/alandipert/1263783 | |
;; | |
;; Copyright (c) Alan Dipert. All rights reserved. | |
;; The use and distribution terms for this software are covered by the | |
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | |
;; By using this software in any fashion, you are agreeing to be bound by | |
;; the terms of this license. | |
;; You must not remove this notice, or any other, from this software. | |
(ns alandipert.kahn |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.plex.pms</string> | |
<key>OnDemand</key> | |
<false/> | |
<key>ProgramArguments</key> |
{:name "Search the Clojurians Slack-archive" | |
:author "Gert Goet" | |
:license "MIT"} | |
;;--- | |
(when-some [q (js/prompt "Search the Clojurians Slack-archive:")] | |
(.open js/window (str "https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/search/" q))) |
#!/usr/bin/env bb | |
(doseq [line (->> (file-seq (clojure.java.io/file (System/getenv "PWD"))) | |
(filter #(.isFile %)) | |
(filter (fn [f] (contains? #{"clj" "cljc" "cljs" "bb"} | |
(last (clojure.string/split (.getName f) #"\."))))) | |
(mapcat #(clojure.string/split-lines (slurp %))) | |
sort | |
)] | |
(println line)) |
;; Like https://github.com/ltratt/multitime but with the power of Clojure: multi-processor, shuffling, advanced statistics | |
;; export BABASHKA_CLASSPATH=$(clojure -Sdeps '{:deps {org.clojure/data.generators {:mvn/version "1.0.0"}, org.clojure/math.combinatorics {:mvn/version "0.1.6"}}}' -Spath) | |
(do | |
(require '[clojure.math.combinatorics :as combo] | |
'[clojure.data.generators :as gen]) | |
(let [binaries ["../sci/tmp/sci-25ace7c" | |
"../sci/tmp/sci-3c01531" | |
"../sci/tmp/sci-6c8852d"] |
bb | |
user=> (babashka.pods/load-pod "./simple-pod.bb") | |
nil | |
user=> (require '[pod.babashka.spire :as spire]) | |
nil | |
user=> (spire/magic! ) | |
java.lang.NullPointerException | |
#error { | |
:cause "Invalid netstring. Unexpected end of input." | |
:via |
I hereby claim:
To claim this, I am signing this object: