Skip to content

Instantly share code, notes, and snippets.

View nkajic's full-sized avatar

Neven Kajić nkajic

  • Zagreb, Croatia
View GitHub Profile
@nkajic
nkajic / m2-delete-catalog-product-eav-duplicates.sql
Last active August 16, 2023 08:29
Delete Magento 2 duplicates on store vs global view catalog product
-- catalog_product_entity_datetime
SELECT * -- DELETE attribute_value_store
FROM catalog_product_entity_datetime attribute_value_store
JOIN catalog_product_entity_datetime attribute_value_global
ON attribute_value_global.store_id = 0
AND attribute_value_global.attribute_id = attribute_value_store.attribute_id
AND attribute_value_global.entity_id = attribute_value_store.entity_id
AND attribute_value_global.value = attribute_value_store.value
WHERE attribute_value_store.store_id > 0
;
@nkajic
nkajic / remove-passive-listeners-warning-p1.patch
Last active October 16, 2021 23:42
Remove passive listeners warning p1 and p2 patch
--- lib/web/jquery/patches/jquery.js
+++ lib/web/jquery/patches/jquery.js
@@ -19,6 +19,33 @@ define([], function () {
});
}
+ /**
+ * Does not use passive listeners to improve scrolling performance
+ * https://stackoverflow.com/questions/60357083/does-not-use-passive-listeners-to-improve-scrolling-performance-lighthouse-repo
+ */
@nkajic
nkajic / LC_CTYPE.txt
Created April 23, 2019 11:07 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@nkajic
nkajic / misc.xml
Created January 27, 2017 09:56
.idea/misc.xml needed for xml namespace recognition in PhpStorm for default Magento 2 (place it in .idea folder and restart PhpStorm)
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectResources">
<resource url="urn:magento:framework:Acl/etc/acl.xsd" location="$PROJECT_DIR$/vendor/magento/framework/Acl/etc/acl.xsd" />
<resource url="urn:magento:framework:Api/etc/extension_attributes.xsd" location="$PROJECT_DIR$/vendor/magento/framework/Api/etc/extension_attributes.xsd" />
<resource url="urn:magento:framework:App/etc/resources.xsd" location="$PROJECT_DIR$/vendor/magento/framework/App/etc/resources.xsd" />
<resource url="urn:magento:framework:App/etc/routes.xsd" location="$PROJECT_DIR$/vendor/magento/framework/App/etc/routes.xsd" />
<resource url="urn:magento:framework:Cache/etc/cache.xsd" location="$PROJECT_DIR$/vendor/magento/framework/Cache/etc/cache.xsd" />
<resource url="urn:magento:framework:Config/etc/theme.xsd" location="$PROJECT_DIR$/vendor/magento/framework/Config/etc/theme.xsd" />
<resource url="urn:magento:framework:Config/etc/view.xsd" location="$PROJECT_DIR$/vendor/