Resize product images in Magento2

To resize product images in Magento2,  you just have to add a etc/view.xml into your own theme (f.e. app/design/frontend/Sheldon/Happytheme/etc/view.xml) ans add something like that:

As you can see, you can adapt the image dimensions for each image type available. That works also for self installed image types. The values for width and height are […]

Get a filename only list of files in a folder

To get a list of all files in a folder without path, you can use the following snippet:

Example result:

Prefix files: If you want to prefix files, you can use the same command too:

Example result:

 

Base64 encode on shell

Sometimes you need to encode a string  with a base64 encoding. For example when trying to send a HTTP request with a Basic Authentication header like that:

As you can see the Basic Auth username and password are included in the request as a base64 encoded string. On the Linux shell this string can […]

New plugin for for DokuWiki

As for Piwik 2.0, I published a new plugin to embed Matomo into DokuWiki today. Matomo ist the follow-up of Piwik and. The switch took place between Piwik 3.2.1 and Matomo 3.3.0 in January 2018. It has exactly the same purpose and functionality but is adapted for Matomo. You can find it on https://www.dokuwiki.org/plugin:matomo and the repository can […]

Get the currently installed Java version and vendor on Ubuntu / Debian Linux

To day I had to  figure out the Java version installed on my machine while digging through some problems with my IntelliJ IDE. This is how you can get the currently installed Java version and vendor on Ubuntu or other debian derivatives on bash.

That gives you something like that:

As you can […]

Tunnel MySQL through SSH

Recently I had the challenge, that the MySQL database of one of the Magento shops I maintain wasn’t accessible directly through the Net. The access was restricted to the Webserver only. So I had to tunnel MySQL through SSH. And that worked like that: edit the ssh config (~/.ssh/config) on the remote Webserver

create  […]

Remove all files and folders including hidden files on bash

To remove all files and folders including hidden files such .gitignore, .htaccess, .git etc. on bash you can use the following command:

Is the same as:

But ever shorter. 😉

Generate a TOC for Markdown (Bitbucket, Git or Gitlab)

This tiny tutorial shows, how to generate a TOC for Markdown with the help of a tiny npm package called doctoc in just a few seconds. Since a while I write down the most important facts about a project or an module to the README.md file of the corresponding GIT repository. That’s good to  keep […]

Docker cheat sheet to handle the Docker universe

Before a while I got in touch with the wonderful world of the Docker (see https://www.docker.com) cosmos. I think it is one of the most important virtualisation technology at the moment. On this page I will just collect useful commands that helped me a lot in my daily work with Docker, Docker-Compose (https://docs.docker.com/compose/) and other stack […]

Magento: change applied attribute product types

Sometimes it is necessary to change the product type(s) an attribute is applied to in Magento. A common example is, that you designed and implemented an attribute for a configurable product, because you thought its real world value is equal over all child manifestations. But after a while you realize, that there are differences that you […]