Magento 2 DependencyWheel

I made a post about Magento dependencies in 2013 with a small visualization graph. It is not that easy to do the same with Magento 2, but luckily I have found DependencyWheel by François Zaninotto. This JavaScript library creates chord diagrams out of a composer.json and a composer.lock with the help of D3. I would like to show you the result.

Continue reading ...

Persistent directories for one-way Docker containers

One-way bottles in germany will be thrown in the garbage after usage. Some Docker containers will be removed or destroyed after execution. But especially for some dependency management tools or task runners it can be nice to have a persistent directory. We can achieve that with the parameter --volumes-from and a busybox. I will show the usage on a Docker container of Composer and Gradle, but the principle is easy to transfer for other building or management Docker containers.

Continue reading ...

Linux - Convert all Ogg files in a directory to MP3

I need to convert all Ogg Vorbis files in a directory to MP3. I will create a small bash script that uses avconv to convert the audio files.

Continue reading ...

Book recommendation - Docker for Developers

I started developing Magento 2 projects a year ago. My beloved development environment with virtualization via Vagrant was not an option anymore for such a monster application. Turning back the evolution with installing PHP and a webserver locally was not an option either. I needed something faster and Docker was that something. I made the normal Getting started tutorial and it felt good and fantastic, but I was not able to transform the learned knowledge to my current project. This is not unusual if I lern new software that has a huge field of use. It is possible to search for Put my existing application into Docker in the world wide web, but the result can be disappointing. My decision was firm, the current project has to wait until I have lerned on a more advanced but minimal project how I can integrate my project into Docker. Luckely there was the book Docker for Developers from Chris Tankersley. I can highly recommend this book for every PHP developer that needs a small introduction into Docker.

Continue reading ...

Building a Gradle Docker image

I like to use Gradle as building tool for my Java Open JDK projects. Unfortunately is there no official image available on Docker Hub. That is why I started to build my own Gradle image.

Continue reading ...

Run Java command line in Docker containers

I try to avoid installing specific versions of programming language interpreters and compilers on my operating system. Project A has other requirements as project B or C and the software stack on my operating system gets more and more confusing. Luckily is it possible to run the most command line based things in a Docker container. I will try to compile and run a small Java program in a Docker container.

Continue reading ...

Levenshtein distance in PHP without 255 characters limit

I needed the levenshtein function from PHP, but unfortunately are there some restrictions.

  • 255 characters limit
  • Problems with UTF-8
  • Only integers possible for custom costs

I have implemented the levenshtein function on my own in plain PHP.

Continue reading ...

Configure host in Windows VirtualBox to reach local webserver

If you are developing a website on Linux or Mac you may want to check the behavior of the website in Windows with the Internet Explorer or with the latest Microsoft Edge web browser. I am developing the most projects local in a Docker container, a Vagrant box or for example on a local Apache server. Sometimes also with the build in webserver of PHP or grunt-contrib-connect. The type of local webserver is not that important, more important is the fact that the webserver is not reachable from outside. Developing on my Linux machine and switching to an Windows machine in my network to check the behavior of the website is no option as workflow. Luckily is Microsoft providing Free Virtual Machines from IE8 to MS Edge.

Continue reading ...

Run different php-cli versions with Docker

I am working on a small PHP library that should use some new features from PHP 7, for example scalar type declarations and return type declarations. But my current Debian 8 has only PHP 5.6.29 for me at the moment. The unstable distribution sid is no option to me and in general I try to avoid installing a specific PHP interpreter on my OS. Fortunately I need PHP only on the command line to test my library so I can use Docker to switch between the versions.

Continue reading ...

Inaccurate rounding with decimal digits

I made a small post about Inexact rounding up or down with decimal digits. But it is also possible to run into the same bug when rounding floating point numbers to the next number with restricted decimal digits. A really common example is the price calculation. You have the price 1.99 for example and the tax is maybe 19%. The resulting price with tax would be 2.3681. So you will need to round the price with two decimal digits to 2.37.

Continue reading ...

Newer Older