Skip to content

Instantly share code, notes, and snippets.

Loving Clojure

Jakub Holy holyjak

Loving Clojure
Block or report user

Report or block holyjak

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
holyjak / X Fulcro mystery
Last active Feb 10, 2020
Fulcro mystery 2 - why isn't the initial state normalized in the DB?
View X Fulcro mystery


L14 is wrong, it should have been wrapped in {..} and thus a join: :query [{:people [(comp/get-query Person)]}]

holyjak / X Fulcro Mystery
Last active Feb 10, 2020
Fulcro mystery - why is initial state not normalized in the DB?
View X Fulcro Mystery


There are 2 problems:

  1. L14 should have been {:query [:people (comp/get-query Person)]
  2. L15 mixes the template and lambda forms; it should have been either
:initial-state (fn [_] {:people [(comp/get-initial-state Person {:id 0 :name "Sally" :city "Nowhere" :state "GA"})
                                 (comp/get-initial-state Person {:id 1 :name "Tom" :city "There" :state "OH"})]}
holyjak /
Last active Jan 6, 2020 — forked from teasherm/
boto3 S3 Multipart Upload with the ability to resume the upload after a failure
#!/usr/bin/env python3
# See
import argparse
import os
import boto3
class S3MultipartUpload(object):
# AWS throws EntityTooSmall error for parts smaller than 5 MB
View klipse-issue.html
<!DOCTYPE html>
<html lang="en" prefix="og:">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=""></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
holyjak / clojure-5269077379395073972.edn
Created Dec 11, 2019
nrepl over drawbridge client error
View clojure-5269077379395073972.edn
{:clojure.main/message "Execution error (ClassCastException) at clj-http.client/parse-url (client.clj:175).\nclass cannot be cast to class java.lang.String ( and java.lang.String are in module java.base of loader 'bootstrap')\n",
:clojure.main/triage {:clojure.error/class java.lang.ClassCastException,
:clojure.error/line 175,
:clojure.error/cause "class cannot be cast to class java.lang.String ( and java.lang.String are in module java.base of loader 'bootstrap')",
:clojure.error/symbol clj-http.client/parse-url,
:clojure.error/source "client.clj",
:clojure.error/phase :execution},
:clojure.main/trace {:via [{:type java.lang.ClassCastException, :message "class cannot be cast to class java.lang.String ( and java.lang.String are in module java.base of loader 'bootstrap')",
holyjak / blog.scss
Created Dec 10, 2019
Cryogen customization: autolink headings etc.
View blog.scss
#post a.anchor, #custom-page a.anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
holyjak / clojure.spec.alpha.clj
Last active Oct 2, 2019
Override clojure.spec.alpha/gensub for friendly exceptions for failed such-that - see
View clojure.spec.alpha.clj
;; Normally the exception thrown by such-that does not point to the failed spec, which makes it useless
;; Eval this to override it and include `path` to the spec (and `form`, not sure which better)
(in-ns 'clojure.spec.alpha)
(defn- gensub
[spec overrides path rmap form]
;;(prn {:spec spec :over overrides :path path :form form})
(let [spec (specize spec)]
(if-let [g (c/or (when-let [gfn (c/or (get overrides (c/or (spec-name spec) spec))
(get overrides path))]
holyjak / CloudWatchMetricsExportAutoConfiguration4SpringBoot1_5.groovy
Created Sep 13, 2019
CloudWatchMetricsExportAutoConfiguration for Spring Boot 1.5 (not supported out of the box)
View CloudWatchMetricsExportAutoConfiguration4SpringBoot1_5.groovy
package myapp.spring.micrometer.cloudwatch;
import com.amazonaws.auth.AWSCredentialsProvider;
import io.micrometer.cloudwatch.CloudWatchConfig;
import io.micrometer.cloudwatch.CloudWatchMeterRegistry;
import io.micrometer.core.instrument.Clock;
import io.micrometer.spring.autoconfigure.CompositeMeterRegistryAutoConfiguration;
import io.micrometer.spring.autoconfigure.MetricsAutoConfiguration;
holyjak / Beginner-friendly
Last active May 10, 2019
Beginner-friendly Clojure
View Beginner-friendly

Setup optimized for beginner friendliness.

BEWARE: Too many extra libraries can eventually cause problems of their own, with dependency conflicts etc.

Editor with REPL integration


  • Use Parinfer
holyjak /
Last active May 2, 2019
Kubernetes resources on AWS EKS having the "no available volume zone" problem

Resources for

The eks-pod-no-avail-volume-zone.yml file is nearly the same as the one we use in prod, only difference is hostname and "prod" / "stage" so this file is most likely not the source of the problem.

The storage is defined and AWS console shows I do have a gp2 volume attached to each worker node.

One difference between stage (broken) and prod (working): the former runs Kubernetes 1.11, the latter 1.10.

Cause & Solution

You can’t perform that action at this time.