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 / client-test.js
Last active October 22, 2020 00:46
matrix client test
// 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']
};
@xurizaemon
xurizaemon / drop_migrate_tables.md
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

@xurizaemon
xurizaemon / behat.yml
Last active July 17, 2020 01:47
examples for behat question
default:
suites:
default:
paths:
- '%paths.base%/features'
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
@xurizaemon
xurizaemon / 01-slingshot-lollies.md
Last active June 21, 2020 09:47
slingshot lollies

For H's science fair project, he wanted to know which lollies were the most accurate.

We got four types of lollies and shot ten of each into targets at 5m range.

The numbers below represent the number of millimetres that the lolly hit from the target.

<script type="text/javascript">
(function() {
function loadIt() {
console.log("DOM fully loaded and parsed");
// Enter OutStream configuration options HERE //
var configParams = {
"width": 640,
"height": 360,
"k_pos": "after",
@xurizaemon
xurizaemon / SA-CORE-2019-09-8.6.x.patch
Last active December 19, 2019 22:11
8.6.x backports for SA-CORE-2019-09 SA-CORE-2019-10 SA-CORE-2019-11 SA-CORE-2019-12
commit 96a625132a34cdf092bc9d19afde3f96eb0687d0
Author: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Wed Dec 18 18:55:10 2019 +1000
SA-CORE-2019-009 by mcdruid, larowlan, Heine, alexpott, xjm, DamienMcKenna, dsnopek, catch, greggles
diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index aed688d8be..f380d7ef12 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
foo/0000755015454201545420000000000013576466645013677 5ustar chrisburgesschrisburgessfoo/hello-2.txt0000644015454201545420000000001013576466645015671 0ustar chrisburgesschrisburgess
diff --git a/example.gitignore b/example.gitignore
index 7cc3227974..9806966eee 100644
--- a/example.gitignore
+++ b/example.gitignore
@@ -1,3 +1,5 @@
+# This file is patched
+#
# This file contains default .gitignore rules. To use it, copy it to .gitignore,
# and it will cause files like your settings.php and user-uploaded files to be
# excluded from Git version control. This is a common strategy to avoid
diff --git a/INSTALL.txt b/INSTALL.txt
index 2ee9ad89b8..1e4712ae84 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,3 +1,4 @@
+This file was patched
Please read core/INSTALL.txt for detailed installation instructions for your
Drupal web site.
langcode: en
status: true
dependencies: { }
id: json_page
migration_tags:
- Example
migration_group: mymodule
label: 'JSON Pages'
source:
plugin: url