Skip to content

Instantly share code, notes, and snippets.

Eero Helenius eerohele

Block or report user

Report or block eerohele

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sudoku_compact.markdown


(ns sudoku
  (:refer-clojure :exclude [==])
  (:use clojure.core.logic))

(defn get-square [rows x y]
  (for [x (range x (+ x 3))
        y (range y (+ y 3))]
eerohele / possible-solutions.markdown
Last active Sep 4, 2019
shadow-cljs: shadow-cljs server shuts down with `RejectedExecutionException` when running `npx shadow-cljs watch app` (macOS)
View possible-solutions.markdown
  1. In your project.clj, try setting your maximum JVM heap size:

    :jvm-opts ["-Xmx2G"]
eerohele /
Last active Jan 11, 2019
shadow-cljs & mkcert

Using mkcert to generate a trusted certificate for ClojureScript development with shadow-cljs

NOTE: These instructions are a work in progress. Don't trust them yet.


View error.txt
;; evaluating the hello-world namespace yields:
CompilerException clojure.lang.ExceptionInfo: Call to #'clojure.set/map-invert did not conform to spec:
-- Spec failed --------------------
Function arguments
View patient-nurse-spec.clj
(def app-db
{:nurses {"Nurse ID A" "Name A"
"Nurse ID B" "Name B"}
:patients [{:patient-id "Patient ID A"}
{:patient-id "Patient ID B"}]
;; A map that shows which nurse is assigned to which patient.
:assignments {"Patient ID A" "Nurse ID A"
"Patient ID B" "Nurse ID B"}})
eerohele / build.gradle.kts
Last active Jun 5, 2018
A Gradle Script Kotlin buildscript for building Saxon-HE (
View build.gradle.kts
// Save this file and settings.gradle into a directory. Then:
// $ gradle
// $ gradle jar
// $ java -cp build/libs/saxon9he.jar net.sf.saxon.Transform <options>
import org.gradle.api.tasks.Copy
eerohele / xslt.clj
Last active Apr 21, 2017
Write XSLT with Clojure
View xslt.clj
(ns clj-xslt
(:require [ :as xml])
(:import (java.time LocalDateTime)
(java.time.format DateTimeFormatter)
( StringBufferInputStream StringWriter StringReader)
( StreamSource)
(net.sf.saxon.s9api XsltCompiler Processor)
(net.sf.saxon Configuration)))
(def processor
eerohele / pain.clj
Last active Apr 14, 2017
Example of a Clojure Schematron implementation
View pain.clj
(ns ^:no-doc clojutron.examples.pain-mdr
(:require [ :as io]
[ :refer [xml1-> attr text]]
[clojutron.schema :refer :all]
[clojure.edn :as edn])
(:refer-clojure :exclude [assert])
(:import (org.iban4j BicUtil IbanUtil)))
(def iso4217-currency-codes
"Read the set of valid ISO 4217 currency codes from an EDN file."
eerohele / pain03-to-html.css
Last active May 22, 2017
Create a HTML representation of a Payments Initiation message (pain.001.001.03)
View pain03-to-html.css
:root {
--baseline: 1.5rem;
--background-color: #090415;
--text-color-default: #F9EEF9;
--text-color-code: #F9EEF9;
--color-emphasis-dark: #1B0C40;
--font-sans-serif: "Fira Sans", Helvetica, sans-serif;
--font-monospace: "Fira Mono", monospace;
You can’t perform that action at this time.