Skip to content

Instantly share code, notes, and snippets.


Mohamed Kaïd mokadev

View GitHub Profile
mokadev /
Created September 30, 2020 12:23 — forked from leek/
Magento 2 - Delete All Test Data

These set of scripts are for Magento 2. For Magento 1, see this Gist.

mokadev / magento-nginx.conf
Created August 19, 2020 18:35 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source:
View magento-nginx.conf
# This is an annotated subset of the Nginx configuration from our Magento production platform @
# See
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/;
events {
View install-0.1.0.php
$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
if (!$installer->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'attribute_name')) {
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'attribute_name', array( // TABLE.COLUMN: DESCRIPTION:
'label' => 'Label', // eav_attribute.frontend_label admin input label
'group' => 'General', // (not a column) tab in product edit screen
'sort_order' => 0 // eav_entity_attribute.sort_order sort order in group
'backend' => 'module/class_name', // eav_attribute.backend_model backend class