Skip to content

Instantly share code, notes, and snippets.

View TimoFreiberg's full-sized avatar

Timo Freiberg TimoFreiberg

  • Stuttgart, Germany
View GitHub Profile
@TimoFreiberg
TimoFreiberg / gist:a047d8d1e042cffc3aec31f1a5a7dd0c
Created December 11, 2017 12:33
CIDER nREPL error (issue 2123
(-->
id "33"
op "eldoc"
session "f4b72e11-dd34-4a65-ac87-08c05a85f553"
time-stamp "2017-12-11 13:27:50.425730501"
ns "advent-of-code.day7"
symbol "children"
)
(<--
id "6"
@TimoFreiberg
TimoFreiberg / gist:9785fbcc39e668c5de0d2797b9f83d6f
Created December 12, 2017 08:10
CIDER Unhandled REPL handler exception...
user> (+ 1 nil)
NullPointerException clojure.lang.Numbers.ops (Numbers.java:1013)
ERROR: Unhandled REPL handler exception processing message {:op stacktrace, :pprint-fn clojure.pprint/pprint, :print-length 50, :print-level 50, :session 02e4cf38-8ebb-4444-9024-257544896c5f, :id 15}
java.lang.NumberFormatException: null
at java.base/java.lang.Integer.parseInt(Integer.java:614)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at cider.nrepl.middleware.util.java$javadoc_url.invokeStatic(java.clj:81)
at cider.nrepl.middleware.util.java$javadoc_url.invoke(java.clj:72)
at cider.nrepl.middleware.util.java$member_info.invokeStatic(java.clj:232)
at cider.nrepl.middleware.util.java$member_info.invoke(java.clj:209)
ERROR: Unhandled REPL handler exception processing message {:print-right-margin 80, :ns filter.core, :file *cider-repl filter(clj)*, :op eval, :column 9, :line 135, :pprint-fn clojure.pprint/pprint, :id 68, :code (slurp *in*), :content-type true, :pprint true, :session f48ac5c0-abda-46a2-970d-30f5a5c1de2b}
java.io.IOException: Stream closed
at java.base/java.io.PushbackReader.ensureOpen(PushbackReader.java:73)
at java.base/java.io.PushbackReader.read(PushbackReader.java:86)
at clojure.lang.LineNumberingPushbackReader.read(LineNumberingPushbackReader.java:51)
at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:313)
@TimoFreiberg
TimoFreiberg / random_alphanumeric.clj
Created September 5, 2018 08:54
clojure random lower case alphanumeric string
(def alphanumeric "0123456789abcdefghijklmnopqrstuvwxyz")
(defn rand-alphanumeric
[len]
(apply str (take len (repeatedly #(rand-nth alphanumeric)))))
$ lein test
java.lang.RuntimeException: Invalid token: ::t/kw
at clojure.lang.Util.runtimeException (Util.java:221)
clojure.lang.LispReader.interpretToken (LispReader.java:390)
clojure.lang.LispReader.read (LispReader.java:283)
clojure.lang.LispReader.readDelimitedList (LispReader.java:1200)
clojure.lang.LispReader$ListReader.invoke (LispReader.java:1049)
clojure.lang.LispReader.read (LispReader.java:263)
clojure.lang.LispReader.read (LispReader.java:196)
clojure.lang.LispReader.read (LispReader.java:185)
@TimoFreiberg
TimoFreiberg / deserializer.rs
Created March 27, 2019 12:11
Rust calamine DataType to String deserializer
use std::fmt;
use serde::de::{self, Visitor};
use serde::{Deserialize, Deserializer};
fn deserialize_datatype_as_optional_string<'de, D>(
deserializer: D,
) -> Result<Option<String>, D::Error>
where
D: Deserializer<'de>,
@TimoFreiberg
TimoFreiberg / gist:9276eb0ee2eb3f0d3bd1b577e75e3950
Created March 30, 2019 14:36
gruvbox backtrace (void-variable neo-banner-face)
Debugger entered--Lisp error: (void-variable neo-banner-face)
(list :inherit neo-banner-face)
(list '((class color) (min-colors 16777215)) (list :inherit neo-banner-face))
(list (list '((class color) (min-colors 16777215)) (list :inherit neo-banner-face)))
(list (list (list '((class color) (min-colors 16777215)) (list :background gruvbox-bg :foreground gruvbox-light0))) (list (list '((class color) (min-colors 16777215)) (list :background gruvbox-light0))) (list (list '((class color) (min-colors 16777215)) (list :background gruvbox-dark3 :foreground gruvbox-light2 :box (list)))) (list (list '((class color) (min-colors 16777215)) (list :background gruvbox-dark1 :foreground gruvbox-light4 :box (list)))) (list (list '((class color) (min-colors 16777215)) (list :background gruvbox-bg))) (list (list '((class color) (min-colors 16777215)) (list :background gruvbox-dark1))) (list (list '((class color) (min-colors 16777215)) (list :background gruvbox-dark2))) (list (list '((class color) (min-colors 16777215))
garbage
ignore_this_header
header1 header2
val1 "a,b,c,d,e"
Opted-in Controller Mask for AppId 238960: 0
Game update: AppID 238960 "", ProcID 4592, IP 0.0.0.0:0
Starting app 238960
Installing breakpad exception handler for appid(steam)/version(1560817063)
>>> Adding process 4592 for game ID 238960
GameAction [AppID 238960, ActionID 1] : LaunchApp changed task to WaitingGameWindow with ""
GameAction [AppID 238960, ActionID 1] : LaunchApp changed task to Completed with ""
JS method call Messaging.PostMessage with 4 arguments
JS method call SharedConnection.SendMsgAndAwaitResponse with 3 arguments
ERROR: ld.so: object '/home/tf/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
@TimoFreiberg
TimoFreiberg / backtrace
Last active May 16, 2020 20:31
Sway crash log (dpms off with kanshi running)
#0 0x00007f15937942e5 in raise () at /usr/lib/libc.so.6
#1 0x00007f159377d853 in abort () at /usr/lib/libc.so.6
#2 0x00007f159377d727 in _nl_load_domain.cold () at /usr/lib/libc.so.6
#3 0x00007f159378c936 in () at /usr/lib/libc.so.6
#4 0x00007f15939f7c10 in () at /usr/lib/libwlroots.so.5
#5 0x00007f15939f8fbb in wlr_output_manager_v1_set_configuration () at /usr/lib/libwlroots.so.5
#6 0x00007f1593a0736e in () at /usr/lib/libwlroots.so.5
#7 0x00007f15939f73b2 in wlr_output_layout_add_auto () at /usr/lib/libwlroots.so.5
#8 0x000055837dfc636b in apply_output_config (oc=oc@entry=0x55837eeb9320, output=output@entry=0x55837f361740) at ../sway/sway/config/output.c:460
wlr_output = 0x55837ef3c9d0