How to login to drupal over postman or CLI (Authorization: Basic)

To login to drupal and POST/PATCH some endpoint over JSON:API you need to login first, this is simple over postman, just go to Authorization TAB, select Basic Auth and fill in your user/pass and this will be automatically added to your header. You could also make it manually adding header with calculated base64 username:password, which you can get with CLI and

Rsyslog using severities, templating and datadog integration

Basic setup

So I will assume you installed syslog and have some default config running for it with syslog_facility set to log_local0. With that lets assume you are using rsyslog and you have config for it in

/etc/rsyslog.conf

which could have all config in this file or separated config files that are included with

Having multiple drush versions on a enviroment

Do this on your local or virtual enviroment, depending where do you want to have it

mkdir ~/drush10
cd ~/drush10
composer require "drush/drush:10.*"

this will install drush10 to that directory and now you just need to add alias

SSH keys setup on Mac OsX

To add multiple ssh keys to your system, you need to edit config file ~/.ssh/config and put lines like below, this will also help store password for your ssh in keychain and use agent forwarding so you can use your keys on virtual machines like vagrant

Check if memcache is working

drush ev 'cache_set("foo", "bar", "cache");'
drush ev '$x = new MemCacheDrupal("cache"); print_r($x->get("foo"));'

snippet to check if memcache is working.

SSL on DrupalVM with Nginx, creating self-signed certificate

To setup SSL on DrupalVM with self-signed certificate you need a few commands and to change config, choose a place where you will store your certificates and then run first

sudo openssl genrsa -out "devcert.key" 2048

then do the

Docksal and VSCode and Xdebug

To setup xdebug with docksal and VSCode there is not much to do. Make your debug profile with info like this