Skip to content

Instantly share code, notes, and snippets.

Avatar
❄️
winter!

Chris Burgess xurizaemon

❄️
winter!
View GitHub Profile
@xurizaemon
xurizaemon / client-test.js
Last active Oct 22, 2020
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']
};
@xurizaemon
xurizaemon / drop_migrate_tables.md
Last active Sep 23, 2020
Dropping Drupal Migrate Tables
View drop_migrate_tables.md

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 Jul 17, 2020
examples for behat question
View behat.yml
default:
suites:
default:
paths:
- '%paths.base%/features'
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
View 01-slingshot-lollies.md

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.

View odt_outstream_video.js
<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 Dec 19, 2019
8.6.x backports for SA-CORE-2019-09 SA-CORE-2019-10 SA-CORE-2019-11 SA-CORE-2019-12
View SA-CORE-2019-09-8.6.x.patch
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
View foo.tar
foo/0000755015454201545420000000000013576466645013677 5ustar chrisburgesschrisburgessfoo/hello-2.txt0000644015454201545420000000001013576466645015671 0ustar chrisburgesschrisburgess
View test-d8-patch.diff
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
View test-d8-patch.diff
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.
View json_page.yml
langcode: en
status: true
dependencies: { }
id: json_page
migration_tags:
- Example
migration_group: mymodule
label: 'JSON Pages'
source:
plugin: url
You can’t perform that action at this time.