Skip to content

Instantly share code, notes, and snippets.

View back-2-95's full-sized avatar

Marko Korhonen back-2-95

View GitHub Profile
@back-2-95
back-2-95 / .env
Last active July 25, 2023 12:15
Lagoon Docker Compose setup
#
# Enviromental values for Makefiles and for Docker Compose
#
# Project specific id/prefix. By default it's the project's foldername
# This if here just for the explanation. Can be left out.
#COMPOSE_PROJECT_NAME=custom
# Local hostname
DRUPAL_HOSTNAME=project.docker.so
@back-2-95
back-2-95 / README.md
Last active August 4, 2023 10:38
Wodby: Upgrade Debian 9 to 11

Instructions on how to do dist upgrade for Debian 9 servers used by Wodby:

First, stop all Docker related services:

systemctl stop kube-apiserver
systemctl stop kube-controller
systemctl stop kube-kubelet
systemctl stop kube-proxy
systemctl stop kube-scheduler
@back-2-95
back-2-95 / README.md
Last active August 30, 2023 05:37
How to get PHP CodeSniffer for Drupal working in PhpStorm

Step 1

Create file called phpcs.xml.dist to your repository root with following content:

<?xml version="1.0"?>
<ruleset name="Drupal Standard">
  <description>A Drupal coding standard</description>
  <config name="drupal_core_version" value="8"/>
 
@back-2-95
back-2-95 / fix-mismatch-entities.php
Created October 9, 2023 04:12
Drush script to fix mismatch entity and/or field definitions
<?php
/**
* @file
* Fix mismatch entity and/or field definitions.
*/
$entity_type_manager = \Drupal::entityTypeManager();
$entity_type_manager->clearCachedDefinitions();
@back-2-95
back-2-95 / migrate.load
Created March 16, 2024 09:43
Pgloader load file for migrating from PlanetScale MySQL to Neon PostgreSQL
LOAD DATABASE
FROM mysql://MY_PLANETSCALE_USERNAME:[email protected]/MY_DATABASE?sslmode=require
INTO postgres://MY_NEON_USERNAME:endpoint=ep-MY_ENDPOINT_ID;MY_NEON_PASSWORD@ep-MY_ENDPOINT_ID.eu-central-1.aws.neon.tech/MY_DATABASE?sslmode=require
WITH include drop, create tables, quote identifiers
ALTER schema 'MY_DATABASE' rename to 'public'
;
@back-2-95
back-2-95 / .env
Last active March 22, 2024 07:19
Create Drupal contribution setup using Stonehenge
DRUPAL_HOSTNAME=drupal-contribute.docker.so