Skip to content

Instantly share code, notes, and snippets.

@4mitch
4mitch / .block
Created March 1, 2021 09:15 — forked from vasturiano/.block
Timelines Chart
height: 700
scrolling: yes
@4mitch
4mitch / lein-different-jvm.sh
Created December 25, 2019 09:43 — forked from camsaul/lein-different-jvm.sh
Run lein with different JVM
#!/bin/bash
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home lein run
;; Gaussian sum!
user=> (crit/with-progress-reporting (crit/quick-bench (/ (* (+ 1 99999) 99999) 2)))
Warming up for JIT optimisations 5000000000 ...
compilation occured before 333366 iterations
Estimating execution count ...
Sampling ...
Final GC...
Checking GC...
WARNING: Final GC required 8.548926352381509 % of runtime
Finding outliers ...
@4mitch
4mitch / readme.md
Created May 12, 2019 19:43
Gist Markdown Cheatsheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraph

@4mitch
4mitch / ns-cheatsheet.clj
Created April 26, 2019 20:26 — forked from ghoseb/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
package nl.avisi.jira;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import com.atlassian.jira.component.ComponentAccessor;
import clojure.java.api.Clojure;
@4mitch
4mitch / repl_in_java.md
Created January 16, 2019 19:32 — forked from mbobesic/repl_in_java.md
Starting a clojure repl from java

Clojure REPL in java

Dependencies

<dependencies>
  <dependency>
    <groupId>org.clojure</groupId>
    <artifactId>clojure</artifactId>
    <version>1.8.0</version>
 
@4mitch
4mitch / profiles.clj
Created December 21, 2018 13:52 — forked from friemen/profiles.clj
My Leiningen profiles.clj
;; put this into profiles.clj in ~/.lein folder
{:user {:jvm-opts ^:replace ["-Xmx3G"]
:plugins [[cider/cider-nrepl "0.19.0-SNAPSHOT"]
[refactor-nrepl "2.4.0"]
[lein-ancient "0.6.15"]
[jonase/eastwood "0.3.3"]
[lein-pprint "1.2.0"]
[lein-try "0.4.3"]
[lein-cloverage "1.0.13"]]
:middleware [cider-nrepl.plugin/middleware
@4mitch
4mitch / gist:0219bad39682fba214a54751477a545e
Created September 23, 2018 22:48 — forked from ekoontz/gist:1502838
Show your classpath within Clojure REPL.
(use 'clojure.pprint)
(import 'java.lang.Thread)
(-> (Thread/currentThread) (.getContextClassLoader) (.getURLs) (seq) (pprint))
@4mitch
4mitch / gist:949d3faa2dcffc2c090088ebbb2d5e46
Created September 22, 2018 22:18 — forked from noisesmith/gist:d9a804212f3759043053
start a clojure 1.8 socket repl
=> (clojure.core.server/start-server {:name "debug connection" :port 5555 :accept 'clojure.core.server/repl})
#object[java.net.ServerSocket 0x631883f0 "ServerSocket[addr=localhost/127.0.0.1,localport=5555]"]