Skip to content

Instantly share code, notes, and snippets.

@artmouse
artmouse / magento_installation.md
Created August 5, 2019 18:01 — forked from LTroya/magento_installation.md
Magento 2 installation guide

Magento 2 installation guide

Nginx configuration

https://gist.github.com/LTroya/a5a570a651c81697b28fdbca65ea51c2

Clone the repository

@artmouse
artmouse / gist:067a63c4711a932cd4129e216636c9b8
Created December 11, 2018 09:11 — forked from Neolot/gist:3964380
PHP Склонение числительных
<?php
/**
* Функция склонения числительных в русском языке
*
* @param int $number Число которое нужно просклонять
* @param array $titles Массив слов для склонения
* @return string
**/
$titles = array('котик', 'котика', 'котиков');
function declOfNum($number, $titles)
@artmouse
artmouse / gist:d0a19c3d78ec593bb98ddac7280ef267
Created December 11, 2018 09:11
Convert core config data value select magento to array php
public function getCountriesRequired(){
$countiesReqConfig = Mage::getStoreConfig('devopentaxvatnumber/general/required_country');
$countriesRequired = explode(",", $countiesReqConfig);
return $countriesRequired;
}
yum -y update
yum -y groupinstall core base "Development Tools"
yum -y install epel-release
yum -y install fail2ban mc htop iftop vim iptables
yum -y install lynx mysql mysql-server mariadb-server mariadb php php-mysql php-mbstring tftp-server httpd ncurses-devel sendmail sendmail-cf sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git php-process crontabs cronie cronie-anacron wget vim php-xml uuid-devel sqlite-devel net-tools gnutls-devel php-pear
pear install Console_Getopt
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload
<?php
/**
* SupportDesk_FixAcl.php v1.1
* SupportDesk (www.supportdesk.nu)
* 10/7/2015
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* It is available through the world-wide-web at this URL:
@artmouse
artmouse / ProductimgFix.patch
Created June 22, 2018 05:58 — forked from Stasevi4/ProductimgFix.patch
Magento Fix Undefined index - app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php on line 145
diff --git a/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php b/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php
index 13e8659..f7000df 100755
--- a/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php
+++ b/app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php
@@ -141,12 +141,12 @@ class Mage_ConfigurableSwatches_Helper_Productimg extends Mage_Core_Helper_Abstr
$swatchLabel = $label . self::SWATCH_LABEL_SUFFIX;
$imageKeys[$label] = array_search($label, $imageHaystack);
- if ($imageKeys[$label] === false) {
+ if ($imageKeys[$label] === false && array_keys($mapping, $label)) {
: 1468340010:0;n98-magerun.phar index:status
: 1468340391:0;n98-magerun.phar index:list
: 1468340421:0;n98-magerun.phar index:reindex catalog_product_flat
: 1468340772:0;tail -f webroot/var/debug/pdo_mysql.log
: 1468341555:0;vim /tmp/sig_select.txt
: 1468345597:0;XDEBUG_CONFIG="idekey=PHPSTORM"
: 1468345843:0;export XDEBUG_CONFIG="idekey=PhpStorm"
: 1468345876:0;vim ~/.config/zsh/apache.zsh
: 1468346670:0;rm -rf webroot/var/debug/pdo_mysql.log
: 1468346892:0;sudo vim /var/log/mysql/error.log
@artmouse
artmouse / Magento_phpcs_Phpstorm.md
Created February 5, 2018 18:18 — forked from osrecio/Magento_phpcs_Phpstorm.md
Add PHPCS PHPStorm for Magento

Install PHPCS and add Magento Standars

composer global require magento-ecg/coding-standard
composer global require magento/marketplace-eqp
export PATH=$HOME/bin:/usr/local/bin:$PATH:$HOME/.composer/vendor/bin
phpcs --config-set installed_paths $HOME/.composer/vendor/magento-ecg/coding-standard/,$HOME/.composer/vendor/magento/marketplace-eqp/

Configure PHPCS into PHP Storm

@artmouse
artmouse / gist:ce1030b9276b70c5345b6a1dd5962241
Last active February 7, 2018 11:18 — forked from fbrnc/gist:7645313
Reset Magento EE changelogs
SET FOREIGN_KEY_CHECKS = 0;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
@artmouse
artmouse / clean-magento_ce-db-extended.sql
Created January 19, 2018 15:47 — forked from frozenminds/clean-magento_ce-db-extended.sql
Clean Magento database of junk and unnecessary data
--
-- Magento CE database clean-up extended
--
-- This is an extended clean-up which will clean search, import/export, reports, etc.
--
-- @author Constantin Bejenaru <[email protected]>
-- @copyright Copyright (c) Constantin Bejenaru (http://frozenminds.com/)
-- @license http://www.opensource.org/licenses/mit-license.html MIT License
--