Skip to content

Instantly share code, notes, and snippets.

View navarr's full-sized avatar
🖥️
Magento

Navarr Barnier navarr

🖥️
Magento
View GitHub Profile
<?php
/*
* Place a ddhq.csv file in the same directory. This file is the export of CSP reports from DataDog
* Run this file
* This file will spit out the violated directive, site host, blocked host, blocked uri, and site uri
* However, it will limit it to one row per blocked host for brevity
*/
$ddhq = fopen('ddhq.csv', 'r');
<?php
class ArrayReduce
{
/**
* @template Value
* @template Key
* @template Result
* @param iterable<Key, Value> $toReduce
* @param callable(ArrayReduceResult<Result>, Value $item, Key $key): ArrayReduceResult<Result> $checkMethod
@navarr
navarr / style.css
Last active February 6, 2024 15:09
Turn TikTok Live Stream Webpage into Chatbox only
/* Hide what doesn't matter */
div[class*="DivLiveContainer"] > div[class*="DivLiveContent"] { display: none; } /* Video */
div[class*="DivSideNavContainer"] { display: none; } /* Sidebar */
div[class*="DivTopViewersContainer"] { display: none; } /* Top Viewers */
div[class^="vidiq"] { display: none; } /* Vid-IQ Floating Widget */
/* div[class*="DivBottomStickyMessageContainer"] { display: none; } /* Join Messages */
/* Make Chatbox Full-sized */
div[class*="DivChatRoomAnimationContainer"] { width: 100%; display: block !important; }
--- a/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php 2020-07-17 12:31:19.227057295 +0000
+++ b/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Console/RunTestCommand.php 2020-07-17 12:28:43.891916513 +0000
@@ -136,7 +136,7 @@
$testName . " is not available under " . $testsDirectory
);
}
- $fullCommand = $codeceptionCommand . $testsDirectory . $testName . ' --verbose --steps';
+ $fullCommand = $codeceptionCommand . $testsDirectory . $testName . ' --verbose --steps --xml';
$this->returnCode = max($this->returnCode, $this->executeTestCommand($fullCommand, $output));
}
From 960e6242ce7c0090e72cc1d70a858a84198a5158 Mon Sep 17 00:00:00 2001
From: Navarr Barnier <[email protected]>
Date: Tue, 2 Jun 2020 11:17:14 -0400
Subject: [PATCH] BUNDLE-2583
---
.../web/js/view/validation-message.js | 32 +++++++++++++++----
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/vendor/vertex/module-address-validation/view/frontend/web/js/view/validation-message.js b/vendor/vertex/module-address-validation/view/frontend/web/js/view/validation-message.js
Magento Minor Version PHP 5.5 PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4
2.0
2.1 ✓[1] 2.1.16+
2.2 ✓[2] 2.2.10+
2.3 ✓[3] 2.3.3+
2.4 ✓[3]

Notes:

  1. Only 7.0.2 and ~7.0.6 for 2.1.0-2.1.1. Starting with 2.1.2 that was expanded to include 7.0.4.
@navarr
navarr / VRTX-tax-slowness.patch
Created December 13, 2019 15:25
Resolution for BUNDLE-2320 - Slowness/JavaScript hang on Tax Configuration Page
From 05aa7d9aaa12f3c0e2566f324e0312ffcc788555 Mon Sep 17 00:00:00 2001
From: Damir Korpar <[email protected]>
Date: Thu, 12 Dec 2019 17:24:25 +0100
Subject: [PATCH 1/3] VRTX-702 Loading Flexfields input fields on demand
---
.../web/js/form/caption-formatter.js | 25 +++++++
.../web/js/form/flex-field-select.js | 17 ++---
.../web/js/model/flex-field-table.js | 75 +++++++++++++++++--
.../web/template/flex-field-table.html | 44 +++++++----
@navarr
navarr / bashrc
Created November 7, 2017 16:45
Magento Helper Functions
# Clear & regenerate CSS
refreshcss() {
find /var/www/Magento/pub/static/frontend -name "*.css" -type f -delete
find /var/www/Magento/pub/static/_cache -name "*.css" -type f -delete
find /var/www/Magento/var/view_preprocessed -name "*.less" -type f -delete
find /var/www/Magento/var/view_preprocessed -name "*.css" -type f -delete
/var/www/Magento/bin/magento setup:static-content:deploy -t SDBullion/twentyseventeen --no-html-minify
/var/www/Magento/bin/magento cache:flush full_page
date
}
[0506/163653:INFO:LauncherAppBrowser.cpp(24)] Work dir is C:\Users\Navarr\AppData\Roaming\.minecraft
[0506/163653:INFO:ClientHandler.cpp(182)] Creating launcher window.
[0506/163653:INFO:LauncherAppRenderer.cpp(110)] Javascript bridge extended.
[0506/163655:INFO:ClientHandler.cpp(846)] Preferences / startup: Read preferences
[0506/163655:INFO:ClientHandler.cpp(846)] Preferences: Wrote preferences
@navarr
navarr / README.md
Last active December 2, 2016 17:12

Usage:

  • Add the mixin somewhere
  • Duplicate the mixin instructions into your require-js
  • Form XML:
  <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">