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
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
#!/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
#!/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
(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
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
#!/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
#!/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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Video</title> | |
</head> | |
<body> | |
<video autoplay controls loop> | |
<source src="video.mp4" type="video/mp4"> | |
Your browser does not support the video tag. |
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
IFn loadString = clojure.java.api.Clojure.var("clojure.core", "load-string"); | |
loadString.invoke("(require '[clojure.core.server :as s]) (defonce _ (s/start-server {:port 7000 :name \"hi\" :accept 'clojure.core.server/repl}))"); | |
// rlwrap telnet localhost 7000 | |
// also | |
public static void bind(String k, Object v) { | |
String src = String.format("(in-ns 'user) #(def %s %%)", k); | |
((IFn) loadString.invoke(src)).invoke(v); |