Skip to content

Instantly share code, notes, and snippets.

View benjamin-asdf's full-sized avatar
🎯
Focusing

Benjamin benjamin-asdf

🎯
Focusing
View GitHub Profile
ERROR: Unhandled REPL handler exception processing message {:op init-debugger, :nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/buffer-size 4096, :nrepl.middleware.print/options {:right-margin 70}, :session 91c8935c-7ea3-48b7-836f-00c929e739d7, :id 6}
Syntax error compiling at (cider/nrepl/inlined_deps/orchard/v0v7v1/orchard/java/parser.clj:1:1).
at clojure.lang.Compiler.load(Compiler.java:7652)
at clojure.lang.RT.loadResourceScript(RT.java:384)
at clojure.lang.RT.loadResourceScript(RT.java:375)
at clojure.lang.RT.load(RT.java:519)
at clojure.lang.RT.load(RT.java:484)
at clojure.core$load$fn__6858.invoke(core.clj:6138)
at clojure.core$load.invokeStatic(core.clj:6137)
at clojure.core$load.doInvoke(core.clj:6121)
@benjamin-asdf
benjamin-asdf / print_table_2.clj
Last active February 24, 2022 10:44
Clojure pprint table markdown compatible, left aligned.
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
; this is the same as clojure.pprint/print-table
; but with some options I liked to have
@benjamin-asdf
benjamin-asdf / google_token.clj
Last active May 11, 2022 06:54
Ths is for requesting tokens for a google service
(ns
org.sg.google.token
(:require
[cheshire.core :as json]
[babashka.curl :as curl]
[buddy.core.keys :as keys]
[buddy.sign.jwt :as jwt]
[clojure.string :as str])
(:gen-class))
@benjamin-asdf
benjamin-asdf / procure-git.sh
Last active March 24, 2023 18:59
Pull gitlibs like clj cli does it. Helps to pull in git deps in a sort of immutable spirit, if you have another ref, it pulls the other ref next to the existing one.
#!/bin/sh
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <git-repo> <ref>"
exit 1
fi
repo=$(echo $1 | sed -e 's/.*\///' -e 's/\.git$//')
mkdir -p .gitlibs/