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
#!/bin/bash | |
# | |
# Script to backup Magento2 Codebase + Database | |
# | |
# @author Raj KB <magepsycho@gmail.com> | |
# @website http://www.magepsycho.com | |
# @version 0.1.0 | |
# UnComment it if bash is lower than 4.x version |
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
# General web stuff | |
#/.htaccess | |
/robots.txt | |
/sitemap.xml | |
# Dynamic Magento data | |
/var/* | |
/media/catalog/product/cache/* | |
/media/tmp/ | |
/media/js/* |
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
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
<?php | |
/** | |
* Generates data with ready-to-edit CSV for magento translation | |
* | |
* A handy tool that generates CSV data for magento theme translation | |
* You can set the $mode to: | |
* a) either write that data to translate.csv at path you specify, | |
* b) or just to dump that data in browser for you to copy and use (default). | |
* In the write mode it appends new data to translate.csv thus you dont |
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 | |
// File: app/code/MagePsycho/Helper/Data.php | |
// Usage: MagePsycho\Demo\Helper\Data::log($message) | |
namespace MagePsycho\Demo\Helper; | |
class Data extends \Magento\Framework\App\Helper\AbstractHelper | |
{ | |
/** |
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 | |
namespace MagePsycho\Demo\Helper; | |
/** | |
* @category MagePsycho | |
* @package MagePsycho_Demo | |
* @author magepsycho@gmail.com | |
* @website http://www.magepsycho.com | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
*/ |