Skip to content

Instantly share code, notes, and snippets.

@amoe
amoe / jstack-long.out
Created December 29, 2016 16:02
parallel-test thread hang
2016-12-29 15:44:37
Full thread dump OpenJDK 64-Bit Server VM (25.102-b14 mixed mode):
"Attach Listener" #45 daemon prio=9 os_prio=0 tid=0x00007ff898001000 nid=0x564c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
- None
"commons-pool-EvictionTimer" #32 daemon prio=5 os_prio=0 tid=0x00007ff85c074800 nid=0x52cf in Object.wait() [0x00007ff87657a000]
@amoe
amoe / core.clj
Last active November 25, 2016 15:54
Demo of componentized reloading Rook server usable with 'lein-ring server'
(ns rook-ring-component-test.core
(:require [ring.util.response :as r]
[io.aviso.rook.server :as rserver]
[com.stuartsierra.component :as component]
[clojure.tools.logging :refer [infof]]
[io.aviso.rook :as rook])
(:gen-class))
;; Basic handler
(defn make-rook-handler []
@amoe
amoe / cider-backtrace.out
Created September 28, 2016 21:07
backtrace from CIDER freeze
Debugger entered--Lisp error: (quit)
fci-get-buffer-windows(t)
fci-extend-rule-for-deletion(333368 333369)
delete-char(-1)
nrepl--pp((dict "arglists" "([s value] [s value from-index])" "doc" "\"Return last index of value (string or char) in s, optionally\\n searching backward from from-index or nil if not found.\""))
nrepl--pp((dict "blank?" (dict "arglists" "([s])" "doc" "\"True if s is nil, empty, or contains only whitespace.\"") "capitalize" (dict "arglists" "([s])" "doc" "\"Converts first character of the string to upper-case, all other\\n characters to lower-case.\"") "ends-with?" (dict "arglists" "([s substr])" "doc" "\"True if s ends with substr.\"") "escape" (dict "arglists" "([s cmap])" "doc" "\"Return a new string, using cmap to escape each character ch\\n from s as follows:\\n \\n If (cmap ch) is nil, append ch to the new string.\\n If (cmap ch) is non-nil, append (str (cmap ch)) instead.\"") "includes?" (dict "arglists" "([s substr])" "doc" "\"True if s includes substr.\"") "in
@amoe
amoe / Log4j2Test.java
Last active December 20, 2015 04:18
Log4j2 and openjdk-7-jdk 7u25-2.3.10-1~deb7u1 produces OutOfMemoryError
package ic.log4j2test;
import java.io.IOException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class Log4j2Test {
private static Logger log = LogManager.getLogger("Hello");
public static void main(String[] args) {