Sign in

Sascha Eggenberger
Sascha Eggenberger. Senior User Experience Designer @unic @Drupal Contributor. Drupal Design System, Claro, Gin. #OpenSource https://sascha.is/

The default Drupal administration interface looks dated in terms of modern design standards. It’s time to change that.

The Gin Admin Theme

Gin is based on Claro and delivers an all-new admin experience for Drupal 8 & 9. Gin brings a refreshed, more modern and fully customisable experience onto the table.

A radical new design

“Is this really Drupal?” is one of the most often heard reactions I usually get when I present the Gin Admin Theme to people. A radical redesign which will delight content editors, site builders and site admins. The editorial experience is at its core of Gin’s adjustments.


Update: You can also easily checkout this repo and just lando start to spin it up: https://github.com/saschaeggi/mautic-lando-starterkit

Requirements

  • lando
  • composer

Install Mautic via composer

composer create-project mautic/core YOURPROJECTNAME ^3 --no-dev

Replace YOURPROJECTNAME with the name of the projects folder.

Lando

Config

Create .lando.yml with the following content:

name: mautic
recipe: lamp
config:
webroot: .
php: '7.3'
database: mysql:5.7
tooling:
mt:
service: appserver
description: Run Mautic commands
cmd: bin/console
proxy:
mailhog:
- mail.mautic.lndo.site
services:
appserver:
type: php
build_as_root:
- docker-php-ext-install sockets
xdebug: true
config:
php: .lando/php/php.ini
database:
type: mysql:5.7
portforward: true
creds:
user: mautic
password: mautic
database: mautic
mailhog:
type: mailhog
portforward: true

Build containers

lando start

This will create…


You upgraded to a shiny new M1 Mac (MacBook, MacBook Pro or Mac Mini) but now brew is broken on your new ARM machine. You can easily fix this:

Depending if you use zsh or bash you need to put the following in either ~/.zshrc or ~/.bashrc :

alias brew='arch -x86_64 brew'

If you haven’t installed Rosetta 2 on your machine yet, you will automatically get an installation prompt the first time you run brew.

This will emulate brew (for now) using Rosetta 2 until brew officially supports ARM on Mac.


Requirements

PHP

Your web server needs to support WebP through PHP.
PHP 5 >= 5.4.0
GD Library

Check your PHP setup
How to check if everything is working as expected:

php -i | grep 'WebP'

If everything is working fine you should see

WebP Support => enabled

We should be ready to go on, yay 🎉

If you get another output, you might need to enable/install libgd and enable it in your PHP.ini.

Drupal

This tutorial only works with Drupal 8/9. As a start you’ll need to enable/install some modules:

  1. ImageAPI Optimize https://www.drupal.org/project/imageapi_optimize The module has built in support for core Image styles…

You just upgraded your brew packages and composer updated itself to version 2.x but you still need version 1.x? This is how you can downgrade (& upgrade again):

Show available versions of composer:

brew log composer

For me the latest 1.x version to date is: composer 1.10.15

Let’s downgrade

composer self-update 1.10.15

To switch back to the 2.x version use

composer self-update --rollback

If vagrant does not run on macOS 11 Big Sur and you’re not able to update it’s plugins, follow this guide.

Prerequisites

If you use brew for ansible etc. Make sure brew works under Big Sur:

Update vagrant

First make sure you have the latest version of vagrant.
Download the latest version from:

https://www.vagrantup.com/downloads

Let’s update the vagrant plugins

vagrant plugin update

You should get a message like

Updated 'vagrant-share' to version '1.1.11'!
Updated 'vagrant-vbguest' to version '0.28.0'!

Now try it again.

vagrant up

It now should work just fine.


If you encounter issues with brew on macOS 11 Big Sur, than it has a high chance of being a similar issue that I ran into.

One of the many error messages regarding brew on macOS 11:

Traceback (most recent call last): 11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>' 10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative' 9: from /usr/local/Homebrew/Library/Homebrew/global.rb:37:in `<top (required)>' 8: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 7: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 6: from /usr/local/Homebrew/Library/Homebrew/os.rb:3:in `<top (required)>' 5: from /usr/local/Homebrew/Library/Homebrew/os.rb:21:in `<module:OS>' 4: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:58:in `prerelease?' 3: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `version' 2: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `new' 1: from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:26:in `initialize' /usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass ()…


In this guide I’ll show you how you can setup Matomo Analytics together with Drupal (will work fine with other systems with some minor adjustments, too) to be GDPR compliant and to respect the “Do Not Track” (DNT) setting of your users.

Drupal

Install the “EU Cookie Compliance” Module

  1. Make sure you’re using the EU Cookie Compliance module.
  2. Set the module up to your liking.
    This module will provide you with a customisable consent banner

Note: I’ve added the Matomo tracking code with a simple JS file, but if you like to configure Matomo on the Drupal backend you can also install https://www.drupal.org/project/matomo for that

Matomo Analytics

Matomo already…


Sometimes Time Machine backups can take a while. The backup process is getting throttled and therefore has not a very high priority.

Set process priority

But you can allow the Time Machine process to gather a higher priority and therefore speed up the backup overall with the following command:

sudo sysctl debug.lowpri_throttle_enabled=0

Reset process priority

To set the process back to it’s original priority we can just set it back to 1.

sudo sysctl debug.lowpri_throttle_enabled=1

For me this speeded up the backup process by other 100%.

See also my tutorial on how to setup a Raspberry Pi 4 as a Time Machine server:


Time Machine is built into the system of macOS and I’m using it since the early days of Mac OS X Leopard. If you have a Raspberry Pi (or two) lying around at your place like me, this tutorial comes in handy to create a cheap and speedy backup solution.

Preparation

Update system software

Make sure your Raspberry Pi is running on the latest software.

sudo apt-get update && sudo apt-get upgrade

Install Samba

We’re going to first install Samba (for SMB) which is a very popular Open Source file sharing protocol which is officially supported by Time Machine for backing up data over a network…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store