Skip to main content

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.

Change what vim considers a keyword in fireplace for clojure

Clojure allows for a lot more chars in a symbol than many other languages. Vim-Fireplace takes care for you by adding lots of the often used additional chars (e.g. ? is the postfix for predicates, symbols starting with : are keywords).

If you are not happy with the choices, you can remove/add simply by creating a ~/.vim/after/ftplugin/clojure.vim file and manipulate the iskeyword there. E.g. set iskeyword-=/ will make the / char a barrier, where word motions stop. Check with calling set iskeyword on the command prompt what is configured.

Make the wrapper the default in IntelliJ when generating the project files with Gradle

When generating the project files for IntelliJ with Gradle (e.g. gradle idea), the default makes IntelliJ ask about an existing Gradle project and defaults to the local Gradle version. Since the project is generated already via Gradle the point is moot and defaulting to the wrapper is the most sensible default.

Gradle allows manipulation of the generated files of the idea plug-in. It's easy to compare the XML file <project>.ipr before and after the changes are made from IntelliJ. Extract the XML fragment and store it (e.g. in gradle/idea/gradleSettings.xml):

<component name="GradleSettings">
        <option name="linkedExternalProjectsSettings">
                        <option name="distributionType" value="WRAPPED" />
                        <option name="externalProjectPath" value="$PROJECT_DIR$" />
                        <option name="modules">
                                        <option value="$PROJECT_DIR$" />

Add in your build.gradle the code to append this chunk:

idea {
        project.ipr {
                withXml { provider ->
                        // set local wrapper via gradle settings
                        provider.node.append(new XmlParser().parse(file("gradle/idea/gradleSettings.xml")))

So close to a tweetable Springboot Vaadin application

Springboot allows you to run a Groovy script with nearly no ceremonial boilerplate code around it from command line (e.g. just annotate a Groovy class with @RestController). For quick GUI tests this would be great. Right now, sadly it needs alot boilerplate...

import org.vaadin.spring.annotation.VaadinUI
import com.vaadin.server.VaadinRequest
import com.vaadin.ui.*

class MyUI extends UI {
        protected void init(VaadinRequest request) {
                setContent(new Label("Hello World"))

Store as vaadin.groovy and run with spring run vaadin.groovy (or even with spring run vaadin.groovy --watch to make it reload automatically). Then navigate your browser to http://localhost:8080.

spring-boot-vaadin pulls in the autoconfiguration for Springboot. And the themes and client-compiled are needed for the theme and the widgetset. server is for having the proper versions (or else we get the transitive ones from the plugin)