start new:
tmux
start new with session name:
tmux new -s myname
(ns tachyons | |
(:require [clojure.string :as str])) | |
(defn styles->str [styles] | |
(let [ref-marker "*" | |
is-symbol? #(str/starts-with? % ref-marker) | |
class-or-sym #(cond | |
(is-symbol? %) | |
(-> % | |
name |
(ns with-args) | |
;; input | |
#_(with-args args | |
[hostname "127.0.0.1" ;; default values if args at position are not provided | |
port "3030"] | |
[hostname port]) | |
;; output | |
#_(let [{hostname 0 |
;; This seems the fastest output of prettier-eslint_d I've seen, using prettier-eslint-emacs seemd | |
;; much slower, using the suggested cat | prettier_eslint_d --stdin with the added tee to the output file | |
;; is much quicker. | |
(defun user-prettier-eslint () | |
"Format the current file with ESLint." | |
(interactive) | |
(let* ((binary (executable-find "prettier-eslint_d")) | |
(command (format "cat %s | %s --stdin | tee %s" buffer-file-name binary buffer-file-name))) | |
(progn | |
(shell-command command "*test-buffer*" "*prettier-eslint-errors*") |
(ns hello-react-blessed.core | |
(:require | |
[cljs.nodejs :as nodejs] | |
[reagent.core :as reagent] | |
[re-frame.core :as rf] | |
[blessed :as blessed] ; or use neo-blessed | |
["react-blessed" :as rb] | |
[ws])) | |
(defonce logger (reagent/atom [])) |
(defn some-lazy | |
([] (some-lazy 1)) | |
([next] | |
(cons next (lazy-seq | |
(do (println "getting next") | |
(some-lazy (inc next))))))) | |
;; Instead of recur, use the name of the function (e.g. some-lazy) to recur | |
;; lazy-seq gets turned to a function and recur target would be hidden. | |
;; Don't hold on to seq returned by some-lazy, only subsets |
converting this code to clojure for renndering with 2d library Copied from https://twitter.com/TedAjax/status/1004865330831712256 l={10,9,8,2,1} ;; list of colors
l={10,9,8,2,1} ;; list of colors
::_::
cls()srand()for m=0,99 do
x=rnd(8)-4
z=rnd(8)-4