Skip to content

Instantly share code, notes, and snippets.

View Stepa4man's full-sized avatar

Stepan Furman Stepa4man

  • TechDivision
  • Germany
View GitHub Profile
@Stepa4man
Stepa4man / Magento 2 Redis configuration
Last active July 30, 2019 07:02
Magento 2 amqp configuration
,
'cache' => [
'frontend' => [
'default' => [
'id_prefix' => 'c49_',
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => '172.16.238.14',
'port' => '6379',
'persistent' => '',
'queue' =>
array (
'amqp' =>
array (
'host' => '0.0.0.0',
'port' => '5672',
'user' => 'guest',
'password' => 'guest',
'virtualhost' => '/',
),
@Stepa4man
Stepa4man / magento1-custom-script.php
Last active October 15, 2018 19:53
Magento 1 script temaplte
<?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();
@Stepa4man
Stepa4man / catalog-urn-build.txt
Last active October 15, 2018 19:53
.idea/misc.xml
bin/magento dev:urn-catalog:generate .idea/misc.xml
@Stepa4man
Stepa4man / install-project.sh
Created September 25, 2018 09:42
Install new project
#!/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;
@Stepa4man
Stepa4man / reinstall-project.sh
Last active September 25, 2018 09:47
Reinstall project
#!/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/;
@Stepa4man
Stepa4man / customer-data-update.txt
Last active October 15, 2018 19:52
Update customer data block in browser console
require('Magento_Customer/js/customer-data').reload(['cart'], false)
@Stepa4man
Stepa4man / hostname.conf
Last active October 16, 2018 10:02
Nginx dev config
#/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;
}
;/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 / update.txt
Created October 20, 2018 21:15
Update Magento
composer require magento/product-community-edition 2.2.5 --no-update