PHPUnit, PhpStorm and docker-compose

I wanted to run tests with PHPUnit on a docker environment, which was set up with docker-compose, and use the PhpStorm integration. Since PhpStorm 2013.2 there is a docker intergration which works well for single containers, but unfortunately it does not seem to use the running network of containers. So for example my PHP container does not get access to the MySQL container for integration tests.

If that’s not a problem for you, you will not need what I am going to explain here, read this instead: https://blog.jetbrains.com/phpstorm/2016/11/docker-remote-interpreters/

Continue reading “PHPUnit, PhpStorm and docker-compose”

Set up KeePass with KeeAgent on Linux

When migrated my workstation to Linux, one important tool was the password manager. I use KeePass, so there are two options around:

I tried both. On KDE, KeePassX integrates nicer into the Linux desktop while KeePass on Mono looks and feels a bit foreign. But the lack of features like auto open and plugins made me ditch KeePassX quite fast. Two important plugins for me are KeePassHttp, which integrates KeePass with Chrome as password manager, and KeeAgent which automatically registers SSH Keys with passphrases at a running SSH Agent.

Setting up KeeAgent was a bit tricky and all instructions I found on the internet were incomplete, so I’ll share how I did it (on Arch Linux with keepass-plugin-keeagent-beta 0.9.1-1). There are two ways to use the plugin: as client for an existing SSH agent or as standalone SSH agent. I choose client mode to always have an SSH agent available.

Continue reading “Set up KeePass with KeeAgent on Linux”

Magento Theme Refactoring

A very common issue in 2014 was „I updated to Magento 1.8 and now my (login|cart) form is not working anymore”. The reason for this happening was that starting with Magento 1.8, the form key was used in more forms as a security feature (it prevents CSRF attacks). But any theme that had its own version of the according templates did not include the form key, so that the server side validation of the form silently failed.

Of course there are themes whose markups are so different from the default theme, that most templates are overridden with good reason. However I see at least as many themes, especially custom themes, where all templates were copied from base/default and then modified. There is almost no excuse to overwrite layout XML files because one can modify the layout in many ways with an additional theme specific local.xml file.

The issue mentioned above is a good example of the reasons for the „pay attention to updatability“ mantra. The errors could have been avoided if only files had been copied, that really required adjustment(s).

With this article I want to explain the process I’m following for theme refactoring (just the structural part, the HTML source will look exactly as before afterwards — except from changes in newer versions of the default templates).

Read more at integer-net.com

Free Icons and Online Icon Generator Tools

Need some icons for your (web) app but have nobody with Mad Photoshop Skills™ at hand? These three sites will help you:

Iconfinder.net

My first icon resource on the web is www.iconfinder.net. It is a very large database of icons and icon sets in various formats and sizes. They are licensed differently, so not all sets are free but even for free commercial use there are plenty. And you can filter by license.

Iconfinder.com Icon Download Database

ICONSDB.com Icon Customizer

Icons DB has thousands of completely free, monochromatic customizable icons. If you need some quick simple flat icons you probably find them here. The clou: you can chose to download all of them in any color and any size as ICO, PNG, GIF, JPG or ICNS

Iconsdb.com Online Icon Generator

Iconizer.net Icon Generator

Iconizer is a big icon database very similar to iconfinder but adds icon customization on top. So even complex multicolor icons can be changed almost arbitrarily in color and size.

Iconizer.net Icon Generator

Another tip:

Choose your icons carefully to be easily recognized by most if not all of your target audience. Even widespread icons like chains for “link” only seem to be natural for geeks like us but are not for your average Joe.

I recommend this article as food for thought: http://stiern.com/articles/usability/usability-in-icons/

Color Palette Tools (not only) for Casual Designers

Who needs to create a simple design from time to time without having too much knowledge about things like color theory, does not need to put his foot into his mouth with the colors. Here are three ressources for harmonic color palettes:

1. Paletton

Simply click and drag the points in the color wheel with your mouse and get a matching palette in real time, including a preview how the colors look like on a website. Presets for lightness and saturation like “Pastel”, “Shiny” oder “Dark” are useful as starting points.

Link: http://paletton.com

Paletton.com Screenshot

2. Colour Lovers

A different approach: Here designers provide color palettes as well as patterns and single colors. You can search palettes by theme, rate and comment them. Chooese from millions of hand crafted palettes!

Link: http://www.colourlovers.com/

COLOURlovers Screenshot

3. Hex Color Tool

For monochromatic palettes the hex color tool suffices. Start with one color, choose the step size to lighten/darken, done. You can experiment with the inputs without losing previous results.

Link: http://hexcolortool.com/

Hex Color Tool Screenshot

$color = rand(0x000000,0xffffff); is out! Even the simplest website should not lack a harmonic color scheme. Continue reading “Color Palette Tools (not only) for Casual Designers”