Skip to content

Instantly share code, notes, and snippets.

Avatar

Neven Kajić nkajic

  • Zagreb, Croatia
View GitHub Profile
@nkajic
nkajic / m2-delete-catalog-product-eav-duplicates.sql
Last active March 22, 2023 09:33
Delete Magento 2 duplicates on store vs global view catalog product
View m2-delete-catalog-product-eav-duplicates.sql
-- catalog_product_entity_varchar
SELECT * -- DELETE attribute_value_store
FROM catalog_product_entity_varchar attribute_value_store
JOIN catalog_product_entity_varchar 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
View remove-passive-listeners-warning-p1.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
View LC_CTYPE.txt
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@nkajic
nkajic / misc.xml
Created October 20, 2017 11:14
.idea/misc.xml is needed for xml namespace recognition for layouts in PhpStorm for default Magento 2.2. (place it in .idea folder and restart PhpStorm)
View misc.xml
<?xml version="1.0"?>
<project version="4">
<component version="2" name="ProjectRootManager"/>
<component name="ProjectResources">
<resource url="urn:magento:module:Magento_Store:etc/config.xsd" location="$PROJECT_DIR$/vendor/magento/module-store/etc/config.xsd"/>
<resource url="urn:magento:framework:ObjectManager/etc/config.xsd" location="$PROJECT_DIR$/vendor/magento/framework/ObjectManager/etc/config.xsd"/>
<resource url="urn:magento:framework:Module/etc/module.xsd" location="$PROJECT_DIR$/vendor/magento/framework/Module/etc/module.xsd"/>
<resource url="urn:magento:module:Magento_Config:etc/system_file.xsd" location="$PROJECT_DIR$/vendor/magento/module-config/etc/system_file.xsd"/>
<resource url="urn:magento:framework:App/etc/routes.xsd" location="$PROJECT_DIR$/vendor/magento/framework/App/etc/routes.xsd"/>
<resource url="urn:magento:module:Magento_Ui:etc/ui_definition.map.xsd" location="$PROJECT_DIR$/vendor/magento/module-ui/etc/ui_definition.map.xsd"/>
@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)
View misc.xml
<?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/