Skip to content

Instantly share code, notes, and snippets.


Chris Burgess xurizaemon

View GitHub Profile
xurizaemon /
Last active May 26, 2023 02:53
A very rough and untested initial stab at xurizaemon/patchwatch


Eh, what's this?

A tool to parse several composer.patches.json (or composer.json) and output a report of patches which are found in all the files.


  1. Put several patches in ./data/*.json
  2. Run ./quick.php (it's not quick once you have a lot of files to parse)
View patch-output.json
"drupal/core": {
"2825860": {
"label": "Notice: Undefined index: value in Drupal\\views\\Plugin\\views\\filter\\NumericFilter->acceptExposedInput()",
"status": "Needs work",
"": [
"3309831": {
xurizaemon / ContentEntityWithConditions.php
Last active April 14, 2023 00:36
Drupal ContentEntity source with conditions feature - content_entity_conditions - web/modules/custom/foo_migrate/src/Plugin/migrate/source/ContentEntityWithConditions.php
View ContentEntityWithConditions.php
namespace Drupal\foo_migrate\Plugin\migrate\source;
use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity;
xurizaemon / docker-compose.yml
Created March 15, 2023 02:52
docker-compose.yml as generated by ISLE-DC for Islandora (
View docker-compose.yml
internal: true
driver: bridge
internal: false
file: /home/example/Projects/islandora/isle-dc/secrets/live/ACTIVEMQ_PASSWORD
View .lando.yml
name: mariadb-custom
recipe: drupal9
webroot: .
database: mariadb
database: .lando/mysql.cnf
xurizaemon / invalid.mermaid
Last active November 25, 2021 08:30
mermaid invalid entry revision_default
View invalid.mermaid
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
xurizaemon / .gitlab-ci.deploy.yml
Last active February 23, 2022 04:15
in answer to a "how do you deploy Drupal" tweet @
View .gitlab-ci.deploy.yml
# Based on
# Basic docker image with ssh to be able to access a remote.
# Each access must add a ssh key, see samples below.
image: alpine:latest
- drush make
- if: '$CI_COMMIT_TAG != null'
xurizaemon /
Last active October 7, 2021 20:11
journal git auto commit


This is how I currently auto-push changes to my work/lab journal repo. It works across multiple systems with minimal clashes (in part because I don't switch devices or edit journal in multiple places concurrently, perhaps). $EDITOR takes care of asking me to resolve conflicts (and shows git diff when appropriate).

I've put it here to share and to invite input on how it might be improved.

In reply to

xurizaemon / client-test.js
Last active October 22, 2020 00:46
matrix client test
View client-test.js
// Load dotenv.
// Load Matrix SDK.
const sdk = require('matrix-js-sdk')
const clientConfig = {
baseUrl: process.env['HUBOT_MATRIX_HOST'],
accessToken: process.env['HUBOT_MATRIX_ACCESS_TOKEN'],
userId: process.env['HUBOT_MATRIX_USER']
xurizaemon /
Last active September 23, 2020 22:09
Dropping Drupal Migrate Tables

Dropping Migrate tables

Please test these thoroughly and/or export the list of tables to drop to a list then write a tidy update hook rather than blowing away data you didn't mean to.

It's a safer idea to write an update hook or export a list of tables to target because it may not be a fair assumption that every table named migrate_* is one you can delete without impact. That's why the core functionality proposed uses a scan for known migrations rather than just deleting tables based on a pattern match.

That said, here are some quick solutions:

Drupal Update hook