ImageMagick: Convert image to PDF without losing quality

If you’re a nerd like me, you probably like using ImageMagick’s convert command line tool to manipulate images or convert them to PDF. It’s fast, powerful and is able to work on tons of images at a time. You could probably do the same in Photoshop or some Adobe product, but come on… what’s the fun in that!

But with great power comes great responsibility… and great confusion. How many times have you had to trawl through Stackoverflow just to use this command properly? I’ve spent hours – days, even – trying out the 290 (!) different options, just to find the combination that works.[...] Read more

PHP development environment with Docker Compose

I’m a professional PHP/Drupal developer and some people have asked me about my development stack. Here’s how you can use Docker to create a PHP development environment on your Mac. Say bye to MAMP!

First you’ll need a Mac laptop. While this is possible on Linux or Windows, I haven’t tried those so your mileage may vary (a lot).[...] Read more

Drupal: Pass arguments to a Views block

In Drupal, it is possible to pass arguments to a Views block. You need to use the “Contextual Filters” option in the View. See screenshot.

Here are some other ways but these are possibly outdated (from 2011): http://drupal.stackexchange.com/questions/17900/how-do-i-pass-some-parameters-to-a-block[...] Read more

Bare bones Drupal 7 custom module

How to create a bare bones Drupal 7 custom module:

  1. Create a module folder in /sites/all/modules/custom/[modname]
  2. Create a [modname].info file. See: https://www.drupal.org/node/1075072
  3. Create a [modname].module file, and create a hook function.

Done![...]