Skip to content

Instantly share code, notes, and snippets.

mynomoto / cats.clj
Created Apr 24, 2019
Sample of using funcool/cats {:mvn/version "2.3.2"}
View cats.clj
(ns kondo.cats
[cats.core :as m]
[cats.monad.either :refer [left left? right right?]]))
(defn assoc-b
[m v]
(right (assoc m :b v)))
(defn merge-2
View Dockerfile
FROM openjdk:8u121-jdk-alpine
RUN apk update && apk add curl bash
ADD https://private/url/for/ /
RUN mkdir /datomic && unzip / -d /datomic
RUN chmod 755 /
View Datomic-HSQLDB

Howto - Setting Up an HSQLDB Storage for Datomic

This gist walks you through the steps of setting up a storage for your datomic starter instance to use an HSQLDB instance (running as a standalone server - i do not address embedded, http, in memory or other forms of the server). I am sure the same can be applied to any other SQL based storage so it should be portable to Apache Derby. I am writing this for those who may find it useful in getting this done quickly without spending a week as I did trying to figure out what I was doing wrong.

Part I : Install & Setup Your Storage: the HSQLDB Server

  1. Download the latest version of the database from here
  2. The most important file you will need is the hsqldb.jar file. This is the database. This will need to be in your classpath to be able to run the server.
  3. I then create a bash script for easy execution of the Network Server version of the database as shown below.
mynomoto /
Created Oct 25, 2017 — forked from nirev/
Teste de Programação - Backend - XERPA

Teste de Programação - Backend - XERPA

Olá! Como parte do processo de seleção da Xerpa, gostaríamos que você fizesse uma pequena tarefa. Esperamos que ela seja feita preferencialmente em uma das nossas linguagens principais: Elixir, Erlang ou Clojure.

A ideia é olhar como é seu estilo de programação e quais decisões você toma ao resolver um problema. Para isso, crie um projeto no seu Github para podermos acompanhar a árvore de commits!

Sinta-se à vontade para criar em cima do problema abaixo.

mynomoto / missing_keys_specs.clj
Created Oct 16, 2017 — forked from stuarthalloway/missing_keys_specs.clj
I think it would be a mistake to introduce temporal coupling to prevent typos.
View missing_keys_specs.clj
;; I think it would be a mistake to introduce temporal coupling to prevent typos.
;; The example program below lets you identify "missing" keys specs at
;; the time and place of your choosing, and then handle them as you
;; deem appropriate, without imposing those decisions on other
;; users of spec.
(require '[clojure.spec.alpha :as s]
'[clojure.set :as set])

Keybase proof

I hereby claim:

  • I am mynomoto on github.
  • I am mynomoto ( on keybase.
  • I have a public key ASAMf1rWQrOzOESVx3LdT_IrgJTyxreNYJyzwZVyIIFPFQo

To claim this, I am signing this object:

View limit
set -e
die () {
echo "$@"
exit 1
limit_memory () {
mynomoto / react_relay.clj
Created Apr 5, 2017 — forked from domkm/react_relay.clj
This is an incredibly hacky ClojureScript wrapper for Relay 0. While we used this in production at one point, I would recommend against doing so. I'm only uploading it for posterity. Relay 1, which decouples the React wrapper from the GraphQL client, will enable us to write a good CLJS wrapper, as opposed to this abomination.
View react_relay.clj
(ns broadbrim.react-relay
[cljs.core :refer [specify! this-as js-arguments js-obj]]
[ :as io]
[clojure.string :as str]
[ :as macro]
[me.raynes.conch :as conch]
[sablono.core :as sablono]
[taoensso.timbre :as log]))
View clojure_spec_missing_piece.clj
;; clojure.spec's missing piece, work in progress
;; this is only halfway done, somebody else will need to do the other 95%
'[clojure.spec :as s]
'[clojure.spec.test :as test])
(defn naive-english-explain
"Copy and paste this into your app. Figure out what it does by
trying it in production."