May 8, 2017

Virtualbox doesn't mount local shared folder, if there is a windows mapped drive before the locale one.

The docker-toolbox uses VirtualBox  to boot a small Linux (boot2docker.iso) to provide the
docker engine.

To use local directories inside the containers, the linux-system in VirtualBox must mount the Windows directories.

There is an option named '--virtualbox-share-folder' to be used with the docker-machine.exec create
or you can map the Shared-Folders in the VirtualBox GUI:

The 'Name' part is the mount-Point in the linux-system.

For the containers you can use the "-v" volume option to mount the directories into the container.

For me, the L: drive was not available when I started the virtual machine with

docker-machine.exe start <virtualLinuxSystem> 

and as a result of this, also the local directory after the mapped networkdrive was not available in the
virtual machine and in the container.

After changing to the mapped networkdrive within the Windows Explorer, the mounts are available in the virtual linux system:

Apr 26, 2017

Convert a SubVersion Repository to GIT

Git has an extension command git-svn which allows to directly interact with a SubVersion repository.

To do the conversion to git completely, I started a container with Fedora as the base image:

docker run -it --name fed --hostname=fed fedora bash

Install git and the remote-hg extension in the container

dnf install git-svn.x86_64 git.x86_64

Clone the mercurial repo:

mkdir <repodir>
cd <repodir>
git svn init --stdlayout --username=<svnuser> --include-paths=<path2include> http://svn.server.h
git svn fetch --all

To get the branches, checkout them locally:

for remote in `git branch -r |grep -v tags | sed -e 's#origin/##'`; do
  git checkout --track -b $remote

Now create the tags, which are branches from the import from SVN:
for remote in `git branch -r |grep tags`; do
  ref=`git show-ref $remote |awk '{print $1}'`;
  tag=`echo $remote |awk -F / '{print $(NF)}'`;
  git tag $tag $ref;

Add the new GIT repo as a remote and push the branches and the tags:

git remote add <name> http://git.server.home/scm/git/<targetRepoInGit>
git push --all <name>
git push --tags <name> 

Now the Repo is on the GIT-Server http://git.server.home/.

Apr 25, 2017

Converting Mercurial (hg) repositories to GIT

Git has an extension command remote-hg which allows to directly interact with an HG (mercurial) repository.

To keep the repository as a mercurial repo you can directly checkout with git and work as if the
repo would be a git repo:

git clone hg::http//hg.server.home/repo

To do the conversion to git completely, I started a container with Fedora as the base image:

docker run -it --name fed --hostname=fed fedora bash

Install git and the remote-hg extension in the container

dnf install git-remote-hg.noarch git.x86_64

Clone the mercurial repo:

git clone hg::http://hg.server.home/repo

To get the branches, checkout them locally:

for remote in `git branch -r |grep branches | sed -e 's#origin/##'`; do
git checkout --track -b $remote

Now rename the branches  if you like

for b in `git branch -l | grep branches | sed -e 's#branches/##'`; do
git branch -m branches/$b $b;

Add the new GIT repo as a remote and push the branches and the tags:

git remote add <name> http://git.server.home/scm/git/<targetRepoInGit>
git push --all <name>
git push --tags <name> 

Now the Repo is on the GIT-Server http://git.server.home/.

Conversion of a CVS repository to GIT

After detecting an old CVS (Concurrent Version System) , we'd like to convert this repository with
multiple modules to a GIT repository.

There is a module in git named git-cvsimport to import a CVS Repository.
The basic command is:
git cvsimport -o <targetbranch> -d <CVSROOT like :pserver:<host>:/repo <cvs-module>   
The problem is, that this command converts one CVS-Module (see CVS/module file) of the

On the repository I'm working on, there are multiple modules and they belong together. After
a little search, I found a script handling multiple modules:

The script linked in this page named is doing the job for me.
Bring in the script to the docker container.

Startup an interactive  docker container with e.g. CentOS as the image

docker run -it --name centos centos bash
yum -y install git git-cvs cvs cvsps 

git config --global "email@domain"
git config --global "Your Name"
 git init <gitrepo>  cd <gitrepo>

Before using the script, a local git repository has to be initialized as shown above, after this,
the CVSROOT has to be modified in and convert all repos with the
following command.

../ <module1> <module2> <module3>

This sequence converts each module and merges it into the new GIT-Repository with a merge commit.

Mar 28, 2017

Modifying the content of multiple files in different directories with Powershell

I had the problem to have multiple git repositories checked out from one server.
But now the GIT-Server has moved to a different address and the config file in each
git repository points to the wrong server.

The quick solution would have been, to add the old server into the hosts files with the
IP-Address of the new one.

But the "clean" solution is to update the config file in each repository. On a Linux Box,
a find and sed would have done the job for me.

But I'm now on a Windows Box. I could install the cygwin package or something similar to get
the UNIX-Tools, but I have already Powershell 

To get the files, the simple command is:

Get-ChildItem */.git/config 

To modify the content: 

Get-ChildItem */.git/config | foreach { (Get-Content $_).replace('', '') | Set-Content $_ }

The foreach ( ForEach-Object) loop is taken, to have the Object of each config-File available to
store it again with the "Set-Content $_". 

Mar 6, 2017

BLU Life One X2 was not detected as MTP device on Windows 8.1

After connection the Phone BLU Life One X2 on my laptop, Windows 8.1 PRO didn't recognize the device. The DeviceManager showed an error in the INF-Section. After searching for a resolution,
I was installing some other drivers and many other things, but without success.

Today I found a short hint here.

(1) Go to C:\Windows\INF
(2) Type "wpdmtp.inf" in search bar provided to the right of the address bar in Windows 10.
(3) Once you found it, just right click on it and select install. It will take a very few seconds.
(4) Connect your device to the pc.

After following this simple steps, the Phone was recognized by the system and the internal and SD Card storage is accessible. 

Jan 30, 2017

Searching for Java classes outside of your projects in a dedicated path within NetBeans

I'm using NetBeans as my Java IDE.

For my current project, I'm working in multiple maven projects which are using some core framework. But - I do not work in the core framework.

Sometimes I have to look into the Code of the core framework.
How to do this.

Store the Code somewhere on your local disk, open a file browser (in my case Multi Commander) and search for the file.
The bad thing is

  • to switch from the IDE and 
  • to show the code outside of the IDE without any syntax highlighting. 
There is a Plugin available to do exactly this thing in NetBeans. It's called Quick File Search
which is available in the Plugin Manager to install: 

After the installation you have to restart the IDE and configure the plugin in the Tools->Options window:

Provide the Base folder, where to search and after pressing <Ctrl>-<I> you get into the search window in the right upper corner and can start to search for the File or other Types and get also the
list of files from this basefolder outside of any project.

Jan 19, 2017

Jumping between tabs and left/right panle in Multi Commander

I switched over to Multi Commander instead of the default Windows Explorer.

MultiCommander has two panes like the "old Norton Commander"  and in each panel multiple
tabs can be opened - a lot easier than searching the right Windows Explorer window 😃.

  • To change the panels, the keyboard shortcut is <Shift>-<TAB>
  • Switching between Tabs in one panel the keyboard shortcut is <Ctrl>-<TAB> or <Ctrl>-<Shift>-<TAB>  depending on the direction. 
  • For opening a new Tab, the keyboard shortcut is <Ctrl>-<T>
  • Favorites can be retrieved with <ALT>-<BACK> to store shortcuts for different locations. 

executing a chain of/multiple requests with postman

In this post, I wrote about reusing response data for a different request, by storing the information.

But now, I'd like to execute multiple requests one after the other, with just one click.

To get this feature of postman, you define multiple requests in a collection and add some code in
the test section:

This is a simple call and in the Test section, the next request is set by


The parameter for setNextRequest is the name of the request, as you can see in the collection on the
left side. After defining multiple requests with a "workflow" through request, you can "run" the request.

Select the arrow of the collection and press the run button as can be seen in the next screenshot.

After pressing the "run" button, the collection runner is opened and you can start the "workflow" of

As you can see, in the middle part you select the collection and the environment to use and press
the "Start Test" button. On the right side, you see the result of each request and on the left side is a
history of the executed sequencies.

Jan 13, 2017

How to allow the focus to follow the mouse in Windows 8.1

Some time ago, I wrote about a method how to get the focus to a background window, without raising it.

After some updates, I searched again for a method to allow the focus to follow the mouse and go to
this posting, which also references my previous source.

For some windows like Word, I have to move the mouse over the taskbar to switch
the focus.

With FullScreenMode on multiple screens, I have also some problems.
Also, the tip to decrease the value of the registry key ActiveWndTrkTimeout is very valuable.

Jan 12, 2017

get a cmd or powershell in windows in a specific directory from Multi Commander

In the previous post, I wrote about starting a shell (cmd.exe or PowerShell) in a specific directory to
which the Windows Explorer is navigated to.

But I mostly use Multi Commander as Windows Explorer replacement. Multi Commander has two
columns, wherein each column multiple tabs can be opened.

To open a shell in a specific directory you can enter "cmd" or "PowerShell" in the red marked text
box followed by a <Return> to start a shell in the directory of the directory of the currently active

get a cmd or powershell in windows in a specific directory from the explorer

it happens quite often for a developer to start a cmd.exe in a specific directory to start e.g. a
maven compilation.

You have the choice to either type in the path for a cd command or navigate in the Windows Explorer to the target directory, copy the path from the address bar and execute the "cd" with copy/paste in the
cmd.exe shell.

But it is much easier.

Navigate in the Windows Explorer to the target directory  and enter "cmd" or "powershell" in the address bar instead of the path:

and you get a cmd.exe in the desired directory without any "cd"

Jan 7, 2017

Monitoring a docker-engine with portainer (

During the last days, I read about "Portainer" ( ), which is a continuation of a
UI fork.

On my local system, I use the Docker Toolbox on Windows 8 for my experiments.

After some attempts, I failed to get any data, but now I got it up and running.

  1. start a machine for docker (already created or create a new one)

    docker-machine start java
  2. set the environment in your shell (in my case Powershell)

    docker-machine env java | Invoke-Expression
  3. Pull the Image

    docker pull portainer/portainer
  4. Start the portainer container

    docker run -d -p 9000:9000 --name portainer portainer/portainer
With this steps, the preparation is finished. Now we can access the UI in a browser. 
To get the IP address of the docker-machine you can use the environment or the docker-machine command:

$env:DOCKER_HOSTdocker-machine.exe ip java

On the first access to the container you have to define the admin password: 

After the password definition, you get a login where you enter the new password. 

The next step is, to define the first endpoint, which is guided:

Here you provide a name (which is shown in the UI), the IP-Address of the docker-machine with
the port (you get it from the $env:DOCKER_HOST environment variable).

The docker-machine is secured by TLS, so you have to provide the certificates.
The files can be found under your home directory:

After this, you continue with the "Connect" Button and get a screen with a failure box:

Here I always thought, I did something wrong. The problem is, that the new endpoint is not used!!

When you select the endpoint on the left side under "ACTIVE ENDPOINT", you get the data: 

With this UI, you can do a lot of basic stuff on the docker-machine like starting/stopping/killing containers. Pulling Images, maintaining the network part and a lot more.