Skip to content

Instantly share code, notes, and snippets.

Avatar
🌻
spring!

Chris Burgess xurizaemon

🌻
spring!
View GitHub Profile
@xurizaemon
xurizaemon / invalid.mermaid
Last active Nov 25, 2021
mermaid invalid entry revision_default
View invalid.mermaid
flowchart LR
subgraph foo[Foo]
revision_default[revision_default]
end
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 Oct 7, 2021
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 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