Skip to content

Instantly share code, notes, and snippets.

View layout.clj
(ns lambdaisland.project-discovery.layout
(:require [net.cgrand.enlive-html :as enlive-html]
[lambdaisland.ornament :as ornament]))
(defn default-layout [{:keys [title content]}]
[:html {:lang "en"}
[:head
[:meta {:charset "UTF-8"}]
[:title title]
[:meta {:name "viewport" :content "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}]
View clojure_core_sorted.clj
(if as-static 0 1))
Object)))))
(replicate (count ptypes) obj-type))))))
" not defined?)"))))
(. m (getDescriptor)))))))
(. m (getName))
(. super-type (getInternalName))
impl-pkg-name "/" prefix (.getName m)
(unchecked-inc ~gi)))
d (if w (- w (if add-sign 1 0))))
View auto_ssh_keys
#!/usr/bin/env bash
# Import SSH keys from Github to ~/.ssh/authorize_keys for all members of a
# given Github organization.
#
# Will replace authorized_keys, if it looks like authorized_keys was not
# previously created by this script then a backup copy is made.
#
# Depends on jq, will download it if not available (assumes Linux) to ~/bin/jq
#
View make_timeline.py
#!/usr/local/bin/python
# https://github.com/jasonreisman/Timeline
# adapted for python3
#
# apt-get install python3-parsedatetime python3-svgwrite python3-tk
import parsedatetime
import svgwrite
View auto_ssh_keys
#!/usr/bin/env bash
# Import SSH keys from Github to ~/.ssh/authorize_keys for all members of a
# given Github organization.
#
# Will replace authorized_keys, if it looks like authorized_keys was not
# previously created by this script then a backup copy is made.
#
# Depends on jq, will download it if not available (assumes Linux) to ~/bin/jq
#
View deps.edn
;; The deps.edn file describes the information needed to build a classpath.
;;
;; When using the `clojure` or `clj` script, there are several deps.edn files
;; that are combined:
;; - install-level
;; - user level (this file)
;; - project level (current directory when invoked)
;;
;; For all attributes other than :paths, these config files are merged left to right.
;; Only the last :paths is kept and others are dropped.
View parse.cljc
(require '[lambdaisland.regal :as regal]
'[lambdaisland.regal.parse :as regal-parse])
;; \R is a line break, it matches \r\n, \r, \n, and some other unicode line
;; breaks. The corresponding Regal form for this is :line-break
(regal/with-flavor :java8 (regal-parse/parse #"\R"))
;; => :line-break
;; Java 9 has different semantics than :line-breaks, so we return a Regal form
;; that emulates Java 9 semantics.
View kaocha_stats.clj
(ns com.nextjournal.test.kaocha-stats
(:require [kaocha.plugin :as plugin :refer [defplugin]]
[kaocha.testable :as testable]
[kaocha.hierarchy :as hierarchy]
[clojure.java.io :as io]
[java-time]
[clojure.edn :as edn])
(:import [java.io PushbackReader]))
(defn test-stats [result]
View shoestring.org

Shoestring Events

Problem statement

In terms of community events in the Clojure ecosystem we mainly have local meetups and conferences. Meetups are easy to organize but fairly low value. Getting good talks is hit or miss, succesfully connecting with others in the community at a meetup is hit or miss as well.

Conferences can provide a lot of value, both in terms of content and in terms of

View clojure-2023289107621991510.edn
{:clojure.main/message
"Syntax error (ClassNotFoundException) compiling new at (ring/adapter/jetty.clj:31:3).\nlambdaisland.logback.clojure_filter.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a\n",
:clojure.main/triage
{:clojure.error/phase :compile-syntax-check,
:clojure.error/line 31,
:clojure.error/column 3,
:clojure.error/source "jetty.clj",
:clojure.error/symbol new,
:clojure.error/path "ring/adapter/jetty.clj",
:clojure.error/class java.lang.ClassNotFoundException,
You can’t perform that action at this time.