Level up with PHPStorm

Nathan Page
6th Nov 2018

There is a whole world of functionality that opens up when your editor can not only edit your code but understand it, and that's why we use PHPStorm. Read on for some thoughts, advice and tips for getting the most out of your IDE.

Read more

Level up your dev environment - top tools and tips from ComputerMinds

Nathan Page
6th Nov 2018

The other day, I shared with the office that I was really blown away by Steve T's Zsh tip about installing a plugin that gives you a desktop toast notification when a long-running command in a zsh terminal completes.

So astounded I was, that I declared that we should put our heads together and share companywide our top tools and tips. No longer should the most useful things be kept quiet, and no longer shall I be content to miss out!

Everyone pitched in with a few ideas, and I thought it would be good to get them written up...

Read more

Quickly update Drupal core

18th Oct 2018

Update: this article's suggested method has serious shortcomings, use other methods when you can! For example, run the following with drush to just upgrade drupal core code (leaving database updates to be run separately):

drush pm-updatecode drupal --check-updatedb=0

If you've got a Drupal site, which you need to update quickly (for example, to address last night's security advisory!), here's a tip. Run this from the command line:

curl 'https://github.com/drupal/drupal/compare/7.59..7.60.patch' | patch -p1

This assumes your codebase was on Drupal 7.59 and you're currently in Drupal's root directory. If you're currently on a different version, adjust the numbers in the...

Read more

Localising dates in twig templates

14th Aug 2018

A client noticed the dates on their news articles were not being translated into the correct language. The name of the month would always appear in English, even though all the month names had themselves been translated and showed correctly elsewhere. The problem turned out to be down to the twig filter being used in the template to format the date. This is what we did have:

{% set newsDate = node.getCreatedTime|date('j F Y') %}
{% trans %} {{ newsDate }}{% endtrans %}

So this would produce something like '1 March 2018' instead of '1 März 2018' when...

Read more