Gradual restart for Cloud Foundry apps

How to restart your Cloud Foundry deployed apps without downtine

Just recently I needed to test a change to an environment variable of an app running in Cloud Foundry without knowing whether this change would need to be persisted in the deployment manifest of that app. Instead of deploying the same app again just because of one environment variable (temporarily) changing, you can change the environment variable on the deployed app and restart it. However the default cf restart will cause your app to be temporarily unavailable.
Read along if you are interested in restarting Cloud Foundry deployed apps without causing a downtime. Continue reading “Gradual restart for Cloud Foundry apps”

Quicktip: Create app launchers in Ubuntu 17.10

I finally managed to update my system to Ubuntu 17.10.
After doing that I wanted to install TeamSpeak 3, which does not come in a .deb file nor is it available through a PPA. While installing and launching it from the cli is straight forward, I wanted to have a launcher for it, so I could start it from Ubuntu 17.10’s application menu like any other app.

After not being satisfied with what Google search brought up (all I found suggested to install alacarte) I did dig a little deeper. What I found is that all you really need to do is to create a .desktop file in ~/.local/share/applications with a specific format.
Check the format1 based on my TeamSpeak 3 launcher:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=3
Terminal=false
Type=Application
Name=TeamSpeak 3
Exec=/home/melo/Downloads/Apps/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Icon=/home/melo/Downloads/Apps/TeamSpeak3-Client-linux_amd64/teamspeak_small.png
StartupWMClass=ts3client_linux_amd64

Now just double-click the .desktop file and your application will launch and show up in the left dock (where you can add it to favorites, too).


  1. StartupWMClass does not seem to be mandatory (details can be found here). 

Package Cloud Foundry java-buildpack with Docker

How I used Docker to package the CF java-buildpack in minutes

Just last week I found myself in the situation were I needed to package the Cloud Foundry Java Buildpack.
Here is why I chose Docker to package the buildpack and what was necessary to get it done both on Linux and on Windows 7 using Docker Toolbox. Continue reading “Package Cloud Foundry java-buildpack with Docker”

Quicktip: Send ADB command to all connected devices

When a bug in your Android app is hard to reproduce, it can make sense to install a debuggable version of your app on more than one device. Some helpful folks shared an easy way to adb install to all connected devices with just one command on stackoverflow.
Based on that I created the following alias:

alias adb+=adb devices | tail -n +2 | cut -sf 1 | xargs -IX adb -s X

This performs an adb devices, starts to read from the output’s 2nd line, gets the serial number in each line and for each line builds the command adb -s *serial number*.
For a full explanation you can check out that command on a web site I find quite useful: explainshell
With that alias in place you can now install your app to all connected devices that show up in adb devices with nothing more than this:

adb+ install *your_debuggable.apk*

Quick and easy, isn’t it? 🙂

Quick ADB setup for any Android device

Use Google USB drivers on Windows regardless of the device vendor

Lately I found my self wanting to debug an Android app I’m trying to take care of. When attempting to just activate USB debugging on some test devices and connecting them to my laptop I was reminded that on Windows 7 sadly things are not all that easy.
But there is actually a way around searching the internet for vendor specific device drivers and using just Google’s USB drivers instead. So if you regularly find yourself in the situation of adding new Android test devices to your pool and deploying your apps through ADB from Windows, this might help you speed up your initial setup process. Continue reading “Quick ADB setup for any Android device”

My blog’s 2016 in review

Just some thoughts and numbers to contemplate my blog’s 2016

2016 was a year of change for me.
I had a few decisions to make, wanted to change and while I was at it I changed my job, too.
2016 was also the year I started blogging, so I decided to put this blog’s first year in numbers.
Continue reading “My blog’s 2016 in review”

Quicktip: If your DS Apps on Android can’t connect anymore

Last week I was surprised to see that the DS apps on my Android phone weren’t able to connect to my DiskStation anymore.
I found out that the latest update to my DiskStation is to blame.
Version DSM 6.0.2-8451 broke the ability to connect to your DikStation through HTTPS for all Android DS apps, except DS Photo.
In the Synology forums people reported that disabling HTTPS/2 support solves the problem.
So in case you experience the same issue just go to Control Panel > Network > DSM Settings and disable HTTP/2 until Synology releases an update to fix this.


UPDATE: Synology released DSM version 6.0.2-8451-2 on the 6th of October. Although there is no mention in the release notes, this update solves the connection issue the Android DS apps encountered since the last DSM udpate. So go ahead an activate HTTP/2 again =)

Quicktip: Working with base64 in the shell

Recently I found myself looking on some base64 encoded values while debugging.
I had an assumption about inputs and wanted to tell if the string I was looking at was the correct base64 encoded representation of those inputs.
I needed a quick answer and I did not want to use one of the base64 encoders/decoders that are available online.
Turns out with Bash (or Cygwin, if you use Windows) you have everything you need for this simple task:

$ echo -n "param1:param2" | base64
cGFyYW0xOnBhcmFtMg==
$ echo -n "cGFyYW0xOnBhcmFtMg==" | base64 -d
param1:param2

Just be sure to add -n option for echo, otherwise a newline is added and encoded!

Integrating GitBlit with Directory Server

Make use of DSM Directory Server as Gitblit authentication provider

I did describe how to turn your DiskStation into a self-hosted Git server in the past, but I wanted to push things a little further and so I started experimenting with DSM’s Directory Server. Read along to find out how to manage users in Directory Server and set it up as authentication provider for GitBlit. Continue reading “Integrating GitBlit with Directory Server”

Enjoying automatic Let’s Encrypt certificate renewal

It is when you start your weekend and notice that your certificates expired, that you start spending your free time on things you actually don’t want to do.
It is when using DSM’s Let’s Encrypt support and a reverse proxy approach for Tomcat, that you actually get to enjoy a sunny Saturday, while your certificates get updated automatically and everything keeps on working without your intervention.
Technology… it’s a good thing 🙂