This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/planck | |
(require '[planck.core :refer [*in* slurp]]) | |
(require '[clojure.string :as string]) | |
(defn replaces [s] | |
(reduce | |
(fn [s [k v]] | |
(string/replace s k v)) | |
s | |
{"Object {" "{" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/planck | |
(require '[planck.shell :refer [sh]]) | |
(require '[cljs.reader :refer [read-string]]) | |
(defn combinations [[head & rest]] | |
(if rest | |
(for [list (combinations rest) | |
item head] | |
(cons item list)) | |
(map list head))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo xattr -r -d com.apple.quarantine my-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns app.render | |
(:require | |
[app.util :as util] | |
[clojure.string :as string])) | |
(defn flatten-list [x] | |
(filter (complement seq?) | |
(rest (tree-seq seq? seq x)))) | |
(defn map->style [m] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import time | |
import tm1637 | |
disp = [63, 6, 91, 79, 102, 109, 125, 7, 127, 111, 119, 108] | |
tm = tm1637.TM1637(clk=5, dio=4) | |
# all LEDS on "88:88" | |
def write(nums): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/homebrew/bin/planck | |
(require '[planck.core :refer [*in* slurp]]) | |
(require '[clojure.string :as string]) | |
(require '[cljs.reader :refer [read-string]]) | |
(def in (slurp *in*)) | |
(def subsections | |
(map second | |
(re-seq #"d=\"([^\"]+)" in))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_debug = false # To get a release build | |
target_cpu = "arm64" | |
v8_target_cpu = "arm64" | |
is_clang = false # To build with GCC instead of clan | |
treat_warnings_as_errors = false | |
is_component_build=true | |
use_custom_libcxx=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; deploy to clojars | |
{:auth {:repository-auth {#"clojars" {:username "whamtet" :password "app-pw"}}} | |
;; then go lein deploy clojars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn flatten-all [m] (->> m (tree-seq coll? seq) (remove coll?))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- pluralize [todo last-num done] | |
(if (empty? todo) | |
done | |
(let [[f & r] todo] | |
(recur | |
r | |
(if (number? f) f last-num) | |
(conj done | |
(if (coll? f) | |
((if (= 1 last-num) first second) f) |