https://gist.github.com/LTroya/a5a570a651c81697b28fdbca65ea51c2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Функция склонения числительных в русском языке | |
* | |
* @param int $number Число которое нужно просклонять | |
* @param array $titles Массив слов для склонения | |
* @return string | |
**/ | |
$titles = array('котик', 'котика', 'котиков'); | |
function declOfNum($number, $titles) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getCountriesRequired(){ | |
$countiesReqConfig = Mage::getStoreConfig('devopentaxvatnumber/general/required_country'); | |
$countriesRequired = explode(",", $countiesReqConfig); | |
return $countriesRequired; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: 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 |
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- 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 | |
-- |