"Clojure running on Raspberry Pi" sounded so cool that I just had to give it a try.
- Download ARM JDK from Oracle and instlal on Raspberry Pi
- Change visudo to contain the following
#!/usr/bin/env bb | |
(ns vidwiz.main | |
"This is a prototype script for automating a portion of my video editing using ffmpeg." | |
(:require [clojure.java.shell :refer [sh]] | |
[clojure.string :as st] | |
[cheshire.core :refer [parse-string]])) | |
;; util | |
(defn get-extension |
{:linters {:mount/defstate {:level :warning}} | |
:hooks {:analyze-call {mount.core/defstate hooks.defstate/defstate}}} |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
(defn remove-duplicates | |
"Returns a lazy sequence of the elements of coll with duplicates removed using a predicate" | |
[coll pred] | |
(let [step (fn step [xs seen] | |
(lazy-seq | |
((fn [[f :as xs] seen] | |
(when-let [s (seq xs)] | |
(if (some #(pred f %) seen) | |
(recur (rest s) seen) | |
(cons f (step (rest s) (conj seen f)))))) |