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 / glitchtip-sample-report.sh
Last active March 19, 2025 03:11
Generate a sample report to GlitchTip
#!/usr/bin/env bash
# Get next three values from GlitchTip project settings "Security endpoint".
# /api/$PROJECT_ID/security/?glitchtip_key=PUBLIC_KEY
# GLITCHTIP_URL=https://app.glitchtip.com/
GLITCHTIP_URL=https://glitchtip.example.com/
PROJECT_ID=1234
PUBLIC_KEY=4373a702c4801b32b2f30a7a03e04b0d
REPORT_URL="${GLITCHTIP_URL}api/${PROJECT_ID}/envelope/?sentry_key=${PUBLIC_KEY}"

There were two things I changed to make this work for me.

First was the cd web/ before applying the recipe. I suspect this is on the radar as a common gotcha (I've seen it mentioned elsewhere).

In the docs at Getting started - applying a recipe

Second was using the "minimal" profile to do the drush site-install. Without this additional change, I found that the blocks from "standard" profile conflicted with blocks to be added by kevinquillen/drupal-base.

@xurizaemon
xurizaemon / .lando.yml
Created June 9, 2023 19:09
lando CLI PHP with xdebug
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

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)
{
"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 May 11, 2024 03:42
Drupal ContentEntity source with conditions feature - content_entity_conditions - web/modules/custom/foo_migrate/src/Plugin/migrate/source/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)
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:
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
Loading
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
# 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'