Skip to content

Instantly share code, notes, and snippets.

FROM openjdk:8u121-jdk-alpine
RUN apk update && apk add curl bash
ADD https://private/url/for/datomic-pro.zip /datomic-pro.zip
RUN mkdir /datomic && unzip /datomic-pro.zip -d /datomic
ADD go.sh /go.sh
RUN chmod 755 /go.sh
@mynomoto
mynomoto / Datomic-HSQLDB Storage.md
Created December 5, 2017 13:32 — forked from jamesnyika/Datomic-HSQLDB Storage.md
Datomic - HSQLDB Storage Setup

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
mynomoto / explorando_marte.md
Created October 25, 2017 14:56 — forked from nirev/explorando_marte.md
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
mynomoto / missing_keys_specs.clj
Created October 16, 2017 12:43 — forked from stuarthalloway/missing_keys_specs.clj
I think it would be a mistake to introduce temporal coupling to prevent typos.
;; 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])
@mynomoto
mynomoto / limit
Created May 15, 2017 18:38 — forked from dgvncsz0f/limit
#!/bin/sh
set -e
die () {
echo "$@"
exit 1
}
limit_memory () {
@mynomoto
mynomoto / react_relay.clj
Created April 5, 2017 02:46 — 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.
(ns broadbrim.react-relay
(:require
[cljs.core :refer [specify! this-as js-arguments js-obj]]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.macro :as macro]
[me.raynes.conch :as conch]
[potemkin]
[sablono.core :as sablono]
[taoensso.timbre :as log]))
;; clojure.spec's missing piece, work in progress
;; this is only halfway done, somebody else will need to do the other 95%
(require
'[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."
(ns ui.form
(:refer-hoplon :exclude [select input textarea label form])
(:require [ui.form.input :as input]
[ui.button :as button]
[ui.modal :as modal]
[ui.grid :as grid]
[ui.filters :as filters]
[ui.link :as link]
[ui.util :as util]
[ui.icon :as icon]
#!/usr/bin/env ruby
require 'base64'
require 'nokogiri'
require 'uri'
def main
html = Nokogiri::HTML($stdin.read)
inline_all_images(html)
inline_all_css(html)