Skip to content

Instantly share code, notes, and snippets.

View ferdinand-beyer's full-sized avatar

Ferdinand Beyer ferdinand-beyer

View GitHub Profile
@ferdinand-beyer
ferdinand-beyer / .profile
Created January 31, 2018 10:31
Use colors in Terminal for commands like 'ls'
export CLICOLOR=1
# Use "bold blue" instead of default blue for directories in 'ls'.
# This will result in a lighter and better readable blue for black
# backgrounds. See 'man ls' for more information.
export LSCOLORS=Exfxcxdxbxegedabagacad
@ferdinand-beyer
ferdinand-beyer / Dockerfile
Created October 10, 2022 08:20
Java Dockerfile template
#
# Following the best practices described here:
# https://snyk.io/blog/best-practices-to-build-java-containers-with-docker/
#
# Pinning the latest LTS (heree: '17-jre-alpine')
FROM eclipse-temurin:17.0.4.1_1-jre-alpine
RUN apk add dumb-init
RUN addgroup --system jvm && \
@ferdinand-beyer
ferdinand-beyer / app_service.clj
Created December 13, 2024 10:48
Example DDD framework for Clojure + Datomic
(ns app.service
(:require [domain.user :as user]
[support.app :as app]))
(defn ensure-user-exists! [username full-name]
(let [ctx (app/new-context)]
(if-let [user (user/find-user-by-username ctx username)]
user
(let [ctx (-> ctx
(user/create-user username full-name)