Skip to content

Instantly share code, notes, and snippets.

View xurizaemon's full-sized avatar
🌻
SPRING

Chris Burgess xurizaemon

🌻
SPRING
View GitHub Profile
@xurizaemon
xurizaemon / .lando.yml
Created June 9, 2023 19:09
lando CLI PHP with xdebug
View .lando.yml
name: whatever
env_file:
- .env
services:
php:
type: php:8.2
via: cli
overrides:
environment:
# Re-use Composer cache between projects.
@xurizaemon
xurizaemon / 00-README.md
Last active May 26, 2023 02:53
A very rough and untested initial stab at xurizaemon/patchwatch
View 00-README.md

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.

How?

  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",
"https://www.drupal.org/files/issues/2023-02-07/2825860-129.patch": [
"project-1"
]
},
"3309831": {
@xurizaemon
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
<?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
xurizaemon / docker-compose.yml
Created March 15, 2023 02:52
docker-compose.yml as generated by ISLE-DC for Islandora (islandora.ca)
View docker-compose.yml
networks:
default:
internal: true
gateway:
driver: bridge
internal: false
secrets:
ACTIVEMQ_PASSWORD:
file: /home/example/Projects/islandora/isle-dc/secrets/live/ACTIVEMQ_PASSWORD
ACTIVEMQ_WEB_ADMIN_PASSWORD:
View .lando.yml
name: mariadb-custom
recipe: drupal9
config:
webroot: .
database: mariadb
services:
database:
config:
database: .lando/mysql.cnf
@xurizaemon
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
xurizaemon / .gitlab-ci.deploy.yml
Last active February 23, 2022 04:15
in answer to a "how do you deploy Drupal" tweet @ https://twitter.com/xurizaemon/status/1450908729122045955
View .gitlab-ci.deploy.yml
# Based on https://gitlab.com/mog33/gitlab-ci-drupal/-/blob/3.x-dev/.gitlab-ci/ci/06_deploy.yml
#
# Basic docker image with ssh to be able to access a remote.
# Each access must add a ssh key, see samples below.
.deploy_ssh:
image: alpine:latest
needs:
- drush make
rules:
- if: '$CI_COMMIT_TAG != null'
@xurizaemon
xurizaemon / journal-git.md
Last active October 7, 2021 20:11
journal git auto commit
View journal-git.md

Auto-sync

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 https://twitter.com/majorhayden/status/1446179887606386689

journal-git.sh

@xurizaemon
xurizaemon / client-test.js
Last active October 22, 2020 00:46
matrix client test
View client-test.js
// Load dotenv.
require('dotenv').config()
// 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']
};