Skip to content

Instantly share code, notes, and snippets.

View efpapado's full-sized avatar

Stathis [Efstathios] Papadopoulos efpapado

View GitHub Profile
diff --git a/src/MigrateBatchExecutable.php b/src/MigrateBatchExecutable.php
index 8e94e6e..6de934e 100644
--- a/src/MigrateBatchExecutable.php
+++ b/src/MigrateBatchExecutable.php
@@ -44,6 +44,13 @@ class MigrateBatchExecutable extends MigrateExecutable {
*/
protected $migrationPluginManager;
+ /**
+ * An array of configuration relevant to the plugin instance.
@efpapado
efpapado / disable-column-statistics-10.3.6.patch
Created January 12, 2022 13:11
Drush: disable column statistics - 10.3.6
diff --git a/src/Sql/SqlMysql.php b/src/Sql/SqlMysql.php
index 796182447..f42bddee6 100644
--- a/src/Sql/SqlMysql.php
+++ b/src/Sql/SqlMysql.php
@@ -24,6 +24,8 @@ class SqlMysql extends SqlBase
// EMPTY password is not the same as NO password, and is valid.
$contents = <<<EOT
#This file was written by Drush's Sqlmysql.php.
+[mysqldump]
+column-statistics=0
@efpapado
efpapado / book_helper_mute_hook_node_update.patch
Last active May 6, 2019 07:32
book_helper_mute_hook_node_update
diff --git a/book_helper.module b/book_helper.module
index f3ffd45..fc21bf0 100755
--- a/book_helper.module
+++ b/book_helper.module
@@ -152,6 +152,21 @@ function book_helper_node_insert($node) {
* Implements hook_node_update().
*/
function book_helper_node_update($node) {
+ // Stathis 06/05/2019
+ // During the implementation of a massive node update, with Marlon's drush-node-update
@efpapado
efpapado / change_sw_route.patch
Created March 11, 2019 07:31
change_sw_route.patch
diff --git a/advanced_pwa.routing.yml b/advanced_pwa.routing.yml
index 178ccc7..8e3b43d 100644
--- a/advanced_pwa.routing.yml
+++ b/advanced_pwa.routing.yml
@@ -73,7 +73,7 @@ advanced_pwa.subscription_list:
_admin_route: TRUE
advanced_pwa.serviceworker_file_data:
- path: /serviceworker-advanced_pwa.js
+ path: '/serviceworker-advanced_pwa_js'
@efpapado
efpapado / 2924777-efpapado.patch
Created February 15, 2019 07:12
2924777-efpapado.patch
diff --git a/ajax_add_to_cart.info.yml b/ajax_add_to_cart.info.yml
index 65a35df..0949357 100644
--- a/ajax_add_to_cart.info.yml
+++ b/ajax_add_to_cart.info.yml
@@ -5,11 +5,5 @@ package: Commerce
dependencies:
- drupal:commerce
- drupal:commerce_cart
- - drupal:commerce_checkout
- - drupal:commerce_order
@efpapado
efpapado / clean-revisions.sql
Last active November 24, 2018 16:01
clean revisions
DELETE field_revision_body
FROM field_revision_body
LEFT JOIN field_data_body
ON field_data_body.revision_id = field_revision_body.revision_id
WHERE field_data_body.entity_id IS NULL;
-- optimize:
OPTIMIZE TABLE field_revision_body;
@efpapado
efpapado / server.js
Created November 23, 2018 09:37
nodejs server that echoes the request
const http = require("http");
const querystring = require('querystring');
const hostname = "0.0.0.0";
const port = 3000;
const server = http.createServer((req, res) => {
console.log(`\n${req.method} ${req.url}`);
console.log(req.headers);
@efpapado
efpapado / reset-D8-updates.sql
Created July 4, 2018 12:20
Reset D8 updates
DELETE FROM key_value WHERE collection='update_fetch_task';
@efpapado
efpapado / dont_cache_routes.patch
Created May 30, 2017 07:02
Drupal 8 multilingual 404
diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php
index 5d92e77..725d64c 100644
--- a/core/lib/Drupal/Core/Routing/RouteProvider.php
+++ b/core/lib/Drupal/Core/Routing/RouteProvider.php
@@ -167,7 +167,7 @@ public function getRouteCollectionForRequest(Request $request) {
'query' => $query_parameters,
'routes' => $routes,
];
- $this->cache->set($cid, $cache_value, CacheBackendInterface::CACHE_PERMANENT, ['route_match']);
+// $this->cache->set($cid, $cache_value, CacheBackendInterface::CACHE_PERMANENT, ['route_match']);
@efpapado
efpapado / tables_rows.sql
Created May 5, 2017 06:13
tables_rows.sql
SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'wodby' ORDER BY table_name;