Skip to content

Instantly share code, notes, and snippets.

View isaksky's full-sized avatar

Isak Sky isaksky

View GitHub Profile
@isaksky
isaksky / i18n-impl.cljs
Created November 5, 2019 05:05
Handling translations in ClojureScript
(ns front.utilities.i18n-impl
(:require [front.i18n]))
(defn build-domain-index [text-vec]
(let [by-msgid (atom (transient {}))
by-msg (atom (transient {}))]
(doseq [{:keys [s_message s_message_id] :as text} text-vec]
(when-not (clojure.string/blank? s_message_id)
(swap! by-msgid assoc! s_message_id text))
(when-not (clojure.string/blank? s_message)
@isaksky
isaksky / step.cljc
Last active August 3, 2021 22:30
tbd.step macro
(ns tbd.step
(:require
[clojure.spec.alpha :as s]))
(s/def ::binding-kvp (s/cat :lhs symbol? :rhs any?))
(s/def ::bindings
(s/and
vector?
(s/conformer vec vec)
@isaksky
isaksky / keybindings.json
Created June 1, 2023 20:26
Calva Keybindings, WASD movement
[
// Disable crazy VSCode default bindings
{
"key": "ctrl+shift+w",
"command": "-workbench.action.closeWindow"
},
{
"key": "ctrl+w",
"command": "-workbench.action.closeActiveEditor"
},