Skip to content

Instantly share code, notes, and snippets.

View thumbnail's full-sized avatar
🛠️
(())

Jeroen de Jong thumbnail

🛠️
(())
View GitHub Profile
@thumbnail
thumbnail / sunricher pairing
Created June 22, 2020 12:35
sunricher pairing instructions
```
+---+---+
| 1 | 2 |
+---+---+
| 3 | 4 |
+---+---+
```
# koppel schakelaar aan gateway
1. 5sec. pairing-button gateway
@thumbnail
thumbnail / lein.zsh
Last active August 22, 2020 08:34
leiningen current verion prompt
function lein_current_version() {
command grep defproject project.clj 2> /dev/null | grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn} -o "\".*"\" | sed "s/\"//g"
}
function lein_prompt() {
cat project.clj &> /dev/null || return 0
ZSH_THEME_LEIN_PROMPT_PREFIX="%{$fg_bold[green]%}"
ZSH_THEME_LEIN_PROMPT_SUFFIX="%{$reset_color%} "
echo "$ZSH_THEME_LEIN_PROMPT_PREFIX$(lein_current_version)$ZSH_THEME_LEIN_PROMPT_SUFFIX"
}
@thumbnail
thumbnail / profiles.clj
Last active June 2, 2020 15:00
disable ansi colors matcher-combinators cursive
;; cursives popup with test-failure information doesn't support ansi.
;; adding this profile to your profiles.clj surpresses ansi colors from poluting the popup
{ :matcher-combinators {:dependencies [[nubank/matcher-combinators "1.2.7"]]
:injections [(try
(require '[matcher-combinators.printer])
(catch java.io.FileNotFoundException _ nil))
(alter-var-root #'matcher-combinators.printer/colorized-print
(fn [f] ;; disable ansi support
(fn colorized-print [{:keys [expression]}]
@thumbnail
thumbnail / profiles.clj
Created November 7, 2019 14:05
reloading lein profile
{:reloading {:dependencies [[org.clojure/tools.namespace "0.3.1"]]
:injections [(->> (System/getProperty "user.dir")
(java.io.File.)
(.listFiles)
(filter #(and (.isDirectory %)
(not (.isHidden %))))
(map #(.getName %))
(filter #{"src", "test", "modules", "libs", "main"}) ;; maybe this should be a blacklist
(apply clojure.tools.namespace.repl/set-refresh-dirs))]}}
@thumbnail
thumbnail / nrebl-cursive.md
Last active November 6, 2019 07:13
nrebl.middleware remove cursive noise
(alter-var-root 'nrebl.middleware/send-to-rebl!
                  (fn [send-to-rebl!]
                    (fn [{:keys [code op] :as req} {:keys [value] :as resp}]
                      (when-not (and (= op "eval")
                                     (clojure.string/starts-with? code "(cursive.repl"))
                        (send-to-rebl! req resp))
                      resp)))
@thumbnail
thumbnail / keybase.md
Last active September 15, 2016 12:10

Keybase proof

I hereby claim:

  • I am thumbnail on github.
  • I am thumbnail95 (https://keybase.io/thumbnail95) on keybase.
  • I have a public key whose fingerprint is 0DF8 B563 09E0 F779 5435 685C E300 172F 2C37 862F

To claim this, I am signing this object: