Skip to content

Instantly share code, notes, and snippets.

Avatar

Stepan Furman Stepa4man

  • TechDivision
  • Germany
View GitHub Profile
View update.txt
composer require magento/product-community-edition 2.2.5 --no-update
View 20-xdebug.ini
;/etc/php/7.1/fpm/conf.d/20-xdebug.ini
zend_extension=xdebug.so
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
xdebug.remote_port=9001
xdebug.remote_mode=req
xdebug.idekey="PHPSTORM"
@Stepa4man
Stepa4man / hostname.conf
Last active Oct 16, 2018
Nginx dev config
View hostname.conf
#/etc/nginx/sites-available/hostname.conf
#/etc/nginx/sites-enabled/hostname.conf <- symblink
server {
listen 80;
server_name mage22-sd.loc;
set $MAGE_ROOT /home/sfurman/devilbox/data/www/hostname;
set $MAGE_MODE developer;
include /home/sfurman/devilbox/data/www/hostname/nginx.dev.conf;
}
@Stepa4man
Stepa4man / customer-data-update.txt
Last active Oct 15, 2018
Update customer data block in browser console
View customer-data-update.txt
require('Magento_Customer/js/customer-data').reload(['cart'], false)
View reinstall-project.sh
#!/bin/sh
echo Please provide url name:
read name
echo Please provide db name:
read dbname
rm -f ./app/etc/config.php ./app/etc/env.php ./pub/static/deployed_version.txt;
rm -rf ./generated/code/ ./generated/metadata/ ./var/page_cache \
./pub/static/frontend/ ./pub/static/adminhtml/ ./var/cache ./var/view_preprocessed/;
View install-project.sh
#!/bin/sh
echo Please provide git repo:
read git
echo Please provide url name:
read name
echo Please provide db name:
read dbname
git clone $git;
View catalog-urn-build.txt
bin/magento dev:urn-catalog:generate .idea/misc.xml
@Stepa4man
Stepa4man / magento1-custom-script.php
Last active Oct 15, 2018
Magento 1 script temaplte
View magento1-custom-script.php
<?php
set_time_limit(0);
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
require_once './app/Mage.php';
Mage::setIsDeveloperMode(true);
Mage::app();
View Magento 2 AMQP Configuration
'queue' =>
array (
'amqp' =>
array (
'host' => '0.0.0.0',
'port' => '5672',
'user' => 'guest',
'password' => 'guest',
'virtualhost' => '/',
),
@Stepa4man
Stepa4man / Magento 2 Redis configuration
Last active Jul 30, 2019
Magento 2 amqp configuration
View Magento 2 Redis configuration
,
'cache' => [
'frontend' => [
'default' => [
'id_prefix' => 'c49_',
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => '172.16.238.14',
'port' => '6379',
'persistent' => '',