Collect translation from Module:
mage2 i18n:collect-phrases --output="app/code/MagePsycho/RedirectPro/i18n/en_US.csv" app/code/MagePsycho/RedirectPro/
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 | |
#################################################### | |
# EDIT | |
$rootMagentoDir = __DIR__; | |
#$csvFile = $rootMagentoDir . '/update_skus.csv'; | |
$logFile = $rootMagentoDir . '/var/log/cli-operation.log'; | |
$dryRun = 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
phpToggleXdebug() { | |
case $1 in | |
on) | |
[ -f /etc/php5/mods-available/xdebug.ini.deactivated ] && sudo mv /etc/php5/mods-available/xdebug.ini.deactivated /etc/php5/mods-available/xdebug.ini | |
sudo service php5-fpm restart | |
sudo service nginx restart | |
;; | |
off) | |
[ -f /etc/php5/mods-available/xdebug.ini ] && sudo mv /etc/php5/mods-available/xdebug.ini /etc/php5/mods-available/xdebug.ini.deactivated | |
sudo service php5-fpm restart |
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
#!/bin/bash | |
# | |
# Script to create MySQL db + user | |
# | |
# @author Raj KB <[email protected]> | |
# @website http://www.magepsycho.com | |
# @version 0.1.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
<?php | |
/** | |
* | |
* @author Raj KB<[email protected]> | |
* @website http://www.magepsycho.com | |
* @extension MassImporterPro: Pricing - http://www.magepsycho.com/mass-importer-pro-price-importer-regular-special-tier-group.html | |
*/ | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); |
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
#! /bin/bash | |
TIMESTAMP=$(date +"%F") | |
BACKUP_DIR="/home/rajendra" | |
MYSQL=/usr/bin/mysql | |
MYSQL_USER="root" | |
MYSQL_PASSWORD="mys123" | |
MYSQLDUMP=/usr/bin/mysqldump | |
mkdir -p "$BACKUP_DIR/mysql-dump" |
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
-- @author Raj KB | |
-- @website http://blog.magepsycho.com | |
SET @STORE_ID = 7; | |
SET @CATALOG_FLAT_TABLE = CONCAT('catalog_product_flat_', @STORE_ID); | |
SET @QUERY = CONCAT('SELECT * FROM ', @CATALOG_FLAT_TABLE, ' LIMIT 10'); | |
PREPARE stmt FROM @QUERY; | |
EXECUTE stmt; | |
DEALLOCATE PREPARE stmt; |
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
-- without using SET variable | |
SELECT t.id, | |
t.count, | |
(@running_total := @running_total + t.count) AS cumulative_sum | |
FROM TABLE t | |
JOIN (SELECT @running_total := 0) r | |
ORDER BY t.id | |
-- with SET variable | |
SET @running_total := 0; |
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
# Start MongoDB
sudo systemctl start mongod
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
# General web stuff | |
#/.htaccess | |
/robots.txt | |
/sitemap.xml | |
# Dynamic Magento data | |
/var/* | |
/media/catalog/product/cache/* | |
/media/tmp/ | |
/media/js/* |