Skip to content

Instantly share code, notes, and snippets.

minimal / link_to_repo.clj
Created Apr 12, 2022
babashka script to symlink shell.nix, .envrc etc
View link_to_repo.clj
View emacs-config.el
(require 'package)
(add-to-list 'package-archives '("marmalade" . ""))
(add-to-list 'package-archives '("melpa" . ""))
;; minimally, install use-package
(unless (package-installed-p 'use-package)
(package-install 'use-package))
#!/usr/bin/env bash
# check formatting of clj files changed from master
lein cljfmt check $(git diff --name-only origin/master |
grep "\\.clj[sc]\\?$" |
paste -s -d" ")
View test_util.clj
(s/fdef defspec-test
:args (s/cat :name simple-symbol?
:sym-or-syms any?
:rest (s/? (s/cat
:num-tests (s/or :int (s/nilable int?) :form list?)
:last (s/? (s/cat :opts (s/nilable map?)))))))
(defmacro defspec-test
([name sym-or-syms] `(defspec-test ~name ~sym-or-syms nil nil))
([name sym-or-syms num-tests] `(defspec-test ~name ~sym-or-syms ~num-tests nil))
minimal / build.boot
Last active Sep 21, 2016
Clojurescript & boot app release version and sentry integration
View build.boot
'[java.time ZonedDateTime]
'[java.time.format DateTimeFormatter])
;; add a RELEASE closure define with the current iso date, RAVEN_DSN from env var
(deftask production []
(task-options! cljs {:optimizations :advanced
:compiler-options {:closure-defines {"goog.DEBUG" false
"myapp.core.RAVEN_DSN" (System/getenv "RAVEN_DSN")
"myapp.core.RELEASE" (.. (ZonedDateTime/now)
minimal / data.clj
Created Sep 21, 2016
ISO now date string in java 8 with clojure
View data.clj
'[java.time ZonedDateTime]
'[java.time.format DateTimeFormatter])
(.. (ZonedDateTime/now) (format DateTimeFormatter/ISO_INSTANT))
View run.clj
(defmacro with-err-str
[& body]
`(let [s# (new]
(binding [*err* s#]
(str s#))))
(defn get-stack-trace-str
(with-err-str (clojure.repl/pst e)))

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View test_util.clj
(ns player-ladder.test-util
(:require [ :as data]
[clojure.pprint :as pp]
[clojure.string :as str]
[clojure.test :refer :all]))
(defn diff->string [diffs]
(for [[actual [a b]] diffs
View lig.diff
diff --git a/src/composite.c b/src/composite.c
index 0f729bc..80e15f1 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1727,20 +1727,45 @@ should be ignored. */)
if (NILP (string))
- if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
- error ("Attempt to shape unibyte text");