Skip to content

Instantly share code, notes, and snippets.

View ivangrozni's full-sized avatar
🏠
Working from home

Lio Novelli ivangrozni

🏠
Working from home
View GitHub Profile
@ivangrozni
ivangrozni / dasht.scm
Last active August 10, 2019 21:03
dasht guix package
(define-module (dasht dasht)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix licenses)
#:use-module (guix git-download)
;; Should I list all dependencies here as well? yes.
#:use-module (gnu packages sqlite)
#:use-module (gnu packages wget)
#:use-module (gnu packages w3m)
#:use-module (gnu packages networking))
@ivangrozni
ivangrozni / filename_transliteration-3269385-double-file-ending.patch
Last active March 16, 2022 13:05
filename transliteration patch drupal
diff --git a/src/FilenamePostprocessor.php b/src/FilenamePostprocessor.php
index 6f1e45b7634a26cf6c78a9dae573fda77dd79845..d2b5451eebbde31a7abb9dc689d9b73c2a85ad5d 100644
--- a/src/FilenamePostprocessor.php
+++ b/src/FilenamePostprocessor.php
@@ -70,8 +70,31 @@ class FilenamePostprocessor {
$filename = str_replace('-_', '_', $filename);
$filename = str_replace('_.', '.', $filename);
$filename = str_replace('-.', '.', $filename);
+ $filename = $this->removeDoubleFileEnding($filename);
@ivangrozni
ivangrozni / file_mdm-3271212.patch
Created March 29, 2022 14:12
file_mdm error reporting patch
diff --git a/src/FileMetadata.php b/src/FileMetadata.php
index 6d72bf66fc64858a6de5901025451fe3279d0ae6..a5436fe2b78545c92ce9dc8ced5c2bf48edccedb 100644
--- a/src/FileMetadata.php
+++ b/src/FileMetadata.php
@@ -168,7 +168,11 @@ class FileMetadata implements FileMetadataInterface {
}
}
catch (\Exception $e) {
- $this->logger->error($e->getMessage());
+ $this->logger->error('Error getting supported keys for @metadata metadata for @uri. Message: @message', [
@ivangrozni
ivangrozni / pel-141.patch
Created March 29, 2022 14:17
pel/pel php library for image metadata library
From 4c7adc422ac51384c1abd66c7db524e17558d883 Mon Sep 17 00:00:00 2001
From: Lio Novelli <liopold@drunomics.com>
Date: Sat, 26 Mar 2022 16:19:38 +0100
Subject: [PATCH] Gracefully handle offset not within boundaries error.
---
src/PelIfd.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PelIfd.php b/src/PelIfd.php
@ivangrozni
ivangrozni / ldp-1383--drupal-core-9.3.14-php81-compat.patch
Last active June 8, 2022 12:39
drupal core 9.3.14 php8.1 compatibilty issue
diff --git a/core/lib/Drupal/Component/Utility/UrlHelper.php b/core/lib/Drupal/Component/Utility/UrlHelper.php
index b23a213518..90bedaff53 100644
--- a/core/lib/Drupal/Component/Utility/UrlHelper.php
+++ b/core/lib/Drupal/Component/Utility/UrlHelper.php
@@ -211,12 +211,12 @@ public static function encodePath($path) {
* TRUE or FALSE, where TRUE indicates an external path.
*/
public static function isExternal($path) {
- $colonpos = strpos($path, ':');
+ $colonpos = strpos((string) $path, ':');
@ivangrozni
ivangrozni / ldp-1555-simple_sitemap-3299827-php81-compatibility.patch
Created July 25, 2022 18:13
ldp-1555-simple_sitemap-3299827-php81-compatibility.patch
From 2a457499e437b0d327c15a76560edaf32cd3c77f Mon Sep 17 00:00:00 2001
From: Lio Novelli <liopold@drunomics.com>
Date: Mon, 25 Jul 2022 20:04:05 +0200
Subject: [PATCH] #3299827: Fix php8.1 compatibility in strlen.
---
src/Commands/SimplesitemapCommands.php | 2 +-
.../SitemapGenerator/DefaultSitemapGenerator.php | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
@ivangrozni
ivangrozni / ldp-1555-drupal-core-3276589-php81-compatibility-html-special-chars.patch
Created July 26, 2022 10:54
ldp-1555-drupal-core-3276589-php81-compatibility-html-special-chars.patch
From a69b1ddfaee8be5160c46b40f7dde4cdcbd8c17b Mon Sep 17 00:00:00 2001
From: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Date: Sun, 16 Jan 2022 23:51:01 +0800
Subject: [PATCH] Issue #3255637: htmlspecialchars(): Passing null to parameter
#1 ($string) of type string is deprecated
---
core/lib/Drupal/Component/Render/FormattableMarkup.php | 2 +-
.../Tests/Component/Render/FormattableMarkupTest.php | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
@ivangrozni
ivangrozni / dev-2024--drupal-monitoring-requirements-recap.patch
Last active October 26, 2022 13:58
dev-2024--drupal-monitoring-requirements-recap.patch
From a62d7c3d7283ad152473afec92ac1f6d65dc2d78 Mon Sep 17 00:00:00 2001
From: Lio Novelli <liopold@drunomics.com>
Date: Fri, 2 Sep 2022 13:04:31 +0200
Subject: [PATCH 01/13] Add requirements recap sensor plugin.
---
.../RequirementsRecapSensorPlugin.php | 156 ++++++++++++++++++
1 file changed, 156 insertions(+)
create mode 100644 src/Plugin/monitoring/SensorPlugin/RequirementsRecapSensorPlugin.php
@ivangrozni
ivangrozni / google_analytics_explode-php81-3261502-2.patch
Created September 29, 2022 17:25
Google analytics 3.x php8.1 compatibility
diff --git a/google_analytics.module b/google_analytics.module
index 0182a5d..83184ff 100644
--- a/google_analytics.module
+++ b/google_analytics.module
@@ -270,7 +270,7 @@ function google_analytics_page_attachments(array &$page) {
// Per RFC 2109, cookie domains must contain at least one dot other than the
// first. For hosts such as 'localhost' or IP Addresses we don't set a
// cookie domain.
- if ($domain_mode == 1 && count(explode('.', $cookie_domain)) > 2 && !is_numeric(str_replace('.', '', $cookie_domain))) {
+ if ($domain_mode == 1 && count(explode('.', $cookie_domain ?? '')) > 2 && !is_numeric(str_replace('.', '', $cookie_domain))) {
@ivangrozni
ivangrozni / dev-2034-ohdear_integration-maintenance-window.patch
Last active October 14, 2022 09:45
dev-2034-ohdear_integration-maintenance-window.patch
diff --git a/README.md b/README.md
index 72a201b1d63c2c4ccfa7dfbc1a2780d2389a4c97..c5f1f4194c9378c0bff0a60a79e6b2d80673d378 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-# Oh Dear Integration
+# OhDear Integration
-Integrates your drupal website with the [Oh Dear](https://ohdear.app) monitoring app.
+Integrates your drupal website with the [OhDear](https://ohdear.app) monitoring app.