Open Source Consultant, Software Developer and System Administrator
If you are interrested in hiring a consultant for the effective use of open source software on an enterprise grade, take a look around in the About section to see, what I have to offer.
Blog and snippets
Various snippets or code parts I found useful, so I keep them here for reference.
Split a sequence by function in Clojure
Clojure REST-REPL
While tools like httpie give you a nice way to query web APIs, they only give you the means to query data easily and print the results nicely. Once you need to modify the results or need to drill down on them, you are on your own.
Therefor I wrote my own tool - REST REPL. It starts a Clojure REPL
with some state handling (imagine cd
from the shell), preloaded libraries,
that make your live easier (clj-http, specter, clojure.data.xml,
cheshire) and make it pretty print (with colors) the results using puget.
Since this is a (close to) regular Clojure REPL, you can handle the data as you are used too and you can place reoccurring code into functions.
Run Springboot fatjar with Palantir Docker Gradle plugin
When creating Docker images for a Springboot project using the Palantir Docker plugin I found no easy way to pick up the fat jar from the bootRepackage task.
One way around this is to set each the jar and the bootRepackage tasks as dependencies. The jar tasks provides the output (which the Docker plugin will pick up) and the bootRepackage actually generates the proper file (with the same name).
Provide a fixed name for the jar, so it's easier to refer from the Dockerfile:
This will generate ofnir-app.jar
.
Then a Dockerfile
can be as simple as: