Resize images using the command line in bash/zsh

sips zsh bash

Another command line script for sharing purpose. It’s a simple script that loops through the current directory and asks you for the new filenames, maximum width and height. I’ve used the OSX built in sips tool but you can rewrite that easily to Imagemagick if you prefer more options or a script that works on Linux as well. The original script is available through my Gist: Happy resizing! And to give some credits to Sips, it’s blazingly fast.

10 Sep 2016

Monitor disk space in your docker container

docker bash

A while ago I wrote a basic Bash script to check the disk space inside running Docker containers. As I couldn’t find much examples for this simple purpose, I’d thought I’d share mine. It’s available in my Github Gist: In essential it takes the following steps, made possible with default Docker commands and a set of string manipulations: List and loop through all running Docker containers Execute some “df” commands within the container with Docker exec Collect the values and email whenever something is more full then you want Of course, monitoring by email is not the best way but it’s fairly easy to move a script like this to be used in Zabbix, Nagios or other monitoring tools.

8 Apr 2016

Generate some helper code for a JPA Entity based on an Oracle database

java jpa oracle

Being a lazy developer, I don’t like writing repetitive code and I think none of the developers enjoy it. So as being one, you start looking into options to avoid those tasks. This time, I looked into a reverse engineer tool for JPA entities. There are tools around and also IDE’s include fancy wizards to do so but so far I didn’t like them. They mostly were either verbose, slow or just not doing what I needed.

13 Feb 2016

A JavaOne rookie experience


Being part of JavaOne this year and including oracle open world as well was pretty special. As a Java developer you know that JavaOne was always the conference to go to. With Oracle acquiring Sun this has changed according to people who experienced both. Nevertheless it was pretty excited and being there on invitation of Oracle is something I’m oracle grateful for. With an a absense of 20 years in the US being back here was another good thing.

4 Nov 2015

Publish your Java libraries to a Maven repository with Gradle

gradle java

Introduction A while ago I was working on a set of libraries that should be shared among several different projects. Most of these projects are based on Gradle and are using Maven repositories for the dependency management. Although the Gradle documentation describes how you can push versions of your library to a repository, I had to collect my information from several locations and combine them into one working solution. So maybe this working example is useful for others too.

18 Oct 2015

Backup dns entries of with Nodejs


One of the worst things that can happen is that you loose sensitive data. I recently had the favor to experience that. Luckily not with something really important and I was able to restore the situation but it made me thinking: this never again. The issue was that due to some bug in the admin environment of (A Dutch dns provider), I lost the dns entries of a domain…. Once I discovered what happened, I asked Transip for a backup of older data, unfortunately there was no backup and the only way to create that, was through their SOAP api.

22 Apr 2015

An Alfred workflow to manage tomcat instances in iTerm2

Alfred Tomcat

I’ve always disliked repeating tasks, earlier when working on Windows. It was one of the main reasons to switch to Mac osx years ago. Writing small but effective scripts makes my live easy every day. So once I discovered Alfred I loved it immediately. Earlier I used Quicksilver, not bad either but Alfred is just awesome. Especially with the paid extensions in the powerpack. I have workflows for daily tasks as opening ssh sessions, setting up vpn’s, open finder windows and killing processes.

1 Mar 2015

A new blog, a new try


Back in 2009 I started my blog, just to push myself in practicing all kind of new technologies and share my findings with other developers. Somewhere in 2012 this goal was somewhat out of sight. So, a good reason to pick this up where it’s left. Or, actually not, I logged in in my Wordpress installation and wasn’t happy with that. Wordpress is great and years ago it was a good cms for blogs too, but these days I’d say it’s converted into a more mature cms covering much more aspects then a simple blog.

28 Feb 2015 #blog #2015

Group a php array to a tree structure


Last week I needed a php method which helps me with converting a Mysql result into a grouped tree structure. The grouping was supposed to be on certain column names from my database result. A quick Google search didn’t give me any useful results so sharing this seems a good option. Disclaimer: I’m not a professional php’er so there’s a big chance that this is not the most easy or fastest way.

26 Nov 2012 #php