Skip to content

Instantly share code, notes, and snippets.

@thomscode
thomscode / drush_stderr_patch.diff
Created September 7, 2017 22:57
Patch for Drush to allow STDERR redirection for Drush in drush_backend_invoke_concurrent
diff --git a/includes/backend.inc b/includes/backend.inc
index 4dce8365..89cec3cd 100644
--- a/includes/backend.inc
+++ b/includes/backend.inc
@@ -845,7 +845,7 @@ function drush_backend_invoke_concurrent($invocations, $common_options = array()
$env_vars = $site_record['#env-vars'];
$php = array_key_exists('php', $site_record) ? $site_record['php'] : (array_key_exists('php', $command_options) ? $command_options['php'] : NULL);
$drush_command_path = drush_build_drush_command($drush_path, $php, $os, $is_remote, $env_vars);
- $cmd = _drush_backend_generate_command($site_record, $drush_command_path . " " . _drush_backend_argument_string($drush_global_options, $os) . " " . $site_record_to_dispatch . " " . $command, $args, $commandline_options, $backend_options) . ' 2>&1';
+ $cmd = _drush_backend_generate_command($site_record, $drush_command_path . " " . _drush_backend_argument_string($drush_global_options, $os) . " " . $site_record_to_dispatch . " " . $command, $args, $commandline_options, $bac
@thomscode
thomscode / drupal-files-folder.diff
Created September 26, 2017 21:15
Drupal-Composer/Drupal-Project Remove Files Folder check
diff --git a/scripts/composer/ScriptHandler.php b/scripts/composer/ScriptHandler.php
index a75e4d3..b7f4d09 100644
--- a/scripts/composer/ScriptHandler.php
+++ b/scripts/composer/ScriptHandler.php
@@ -50,14 +50,6 @@ class ScriptHandler {
$fs->chmod($drupalRoot . '/sites/default/settings.php', 0666);
$event->getIO()->write("Create a sites/default/settings.php file with chmod 0666");
}
-
- // Create the files directory with chmod 0777
@thomscode
thomscode / composer-installers.diff
Last active November 15, 2017 23:30
Disable individual Composer/Installers
From b2b3e213896d7eb41a83b0b0011aa64171a917cc Mon Sep 17 00:00:00 2001
From: Thom Williams <thomscode@gmail.com>
Date: Tue, 7 Nov 2017 04:47:43 -0800
Subject: [PATCH] Add ability to disable individual or all installers
---
src/Composer/Installers/Installer.php | 64 +++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/src/Composer/Installers/Installer.php b/src/Composer/Installers/Installer.php
@thomscode
thomscode / Docker for Mac Date Fix.md
Created December 7, 2017 01:54
Fix or check the date of Docker Hyper-V on Docker for Mac

Docker Date Reset/Check

Check date in Docker Hyper-V

docker run --rm alpine date -u && date -u

Update date in Docker Hyper-V

docker run --rm --privileged alpine date -s "`date -u '+%Y-%m-%d %H:%M:%S'`"
@thomscode
thomscode / PHPCS.md
Created March 11, 2018 23:16
DIsable PHPCS Checks

Disable PHPCS Checks

Disable PHPCS Class Namespace check

// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace -- Because RoboFile should not be namespaced