Skip to content

Instantly share code, notes, and snippets.

View xurizaemon's full-sized avatar
🌻
SPRING

Chris Burgess xurizaemon

🌻
SPRING
View GitHub Profile
#!/usr/bin/env bash
whoami
diff --git a/migrate_media_handler.info.yml b/migrate_media_handler.info.yml
index 0f9eb39..0e8e053 100644
--- a/migrate_media_handler.info.yml
+++ b/migrate_media_handler.info.yml
@@ -5,7 +5,4 @@ package: 'Migrate'
core: '8.x'
dependencies:
- drupal:migrate
- - drupal:migrate_plus
- - drupal:migrate_tools
@xurizaemon
xurizaemon / migration_from_form_submit.php
Created July 10, 2019 21:46
Running a Drupal migration from form submit
// You should probably just read Migrate Source UI code :) but ...
$migration_id = $form_state->getValue('migrations');
// Aha! We'll target the final migration, and let Migration
// dependencies do the legwork of starting the other two.
$migration_id = str_replace('node', 'media', $migration_id);
/** @var \Drupal\migrate\Plugin\Migration $migration */
$migration = $this->pluginManagerMigration->createInstance($migration_id);
@xurizaemon
xurizaemon / FeatureContext.php
Created June 19, 2019 21:04
drupal screenshot on test failure
<?php
// Extracted from FeatureContext.php in Behat.
// This may also require a Behat patch?
/** @AfterStep */
public function takeScreenshotOnFail(Behat\Behat\Hook\Scope\AfterStepScope $scope) {
if (99 === $scope->getTestResult()->getResultCode()) {
$this->takeScreenshot(true);
}
}
admin_toolbar: '8.x-1.26'
anchor_link: 1.1
anchor_link: '8.x-1.6'
better_exposed_filters: '8.x-3.0-alpha6'
bootstrap_layouts: '8.x-5.1'
captcha: '8.x-1.0-beta1'
ckeditor_media_embed: VERSION
ckeditor_media_embed: '8.x-1.3'
ckeditor_templates: '8.x-1.1'
color_field: '8.x-2.0'
commit 1a0d98b810ce1b686c8750d680f8edce153633e1
Author: Chris Burgess <chrisburgess@catalyst.net.nz>
Date: Mon Mar 18 14:49:57 2019 +1300
RM#63544 - Use settings.local.php
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 5bcecc267f..2deefef67c 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@xurizaemon
xurizaemon / ISIG-dunedin.md
Last active February 25, 2019 01:37
ISIG dunedin announce

Announcing the Dunedin chapter of the NZ Information Security Interest Group (https://isig.org.nz).

The first meeting of the Dunedin ISIG will be: 6pm to 8pm, Thursday 7th March 2019, on Level One at Petridish shared office space, 8 Stafford Street, Dunedin.

Please RSVP to jim@cheetham.nz so we can make sure we have a room big enough for you all!

This and future meetings are intended to be free; there is no cost for "membership" of the ISIG. Please come along if you're working in the Information Security world and want to share your knowledge; please come along if you are NOT working in InfoSec and want to learn!

Proposed meeting topics :-

require 'pp'
require 'lolcommits/plugin/base'
require 'lolcommits/cli/launcher'
require 'oauth'
require 'webrick'
require 'cgi'
require 'tumblr_client'
module Lolcommits
module Plugin
@xurizaemon
xurizaemon / output.txt
Created December 12, 2018 00:10
drush help config:set
$ drush help config:set
Set config value directly. Does not perform a config import.
Examples:
drush config:set system.site page.front node Sets system.site:page.front to "node".
Arguments:
config_name The config object name, for example "system.site".
key The config key, for example "page.front".
[value] The value to assign to the config key. Use '-' to read from STDIN.
@xurizaemon
xurizaemon / output.txt
Created November 30, 2018 18:40
urls & ampersands in shell env
$ ./test.sh http://example.org?a=b&c=d
[1] 7753
$1 is http://example.org?a=b
[1]+ Done ./test.sh http://example.org?a=b
$ ./test.sh "http://example.org?a=b&c=d"
$1 is http://example.org?a=b&c=d