Firstly install Brew on your MAC
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install PHP
- brew update
- brew tap homebrew/dupes
- brew tap homebrew/php
- brew install php56
| <?php | |
| /** | |
| * @author Godric Cao | |
| */ | |
| namespace Vendor\Namespace\Model\Subscription\Order; | |
| class Create | |
| { | |
| public function __construct( | |
| \Magento\Framework\App\Helper\Context $context, |
Firstly install Brew on your MAC
Then install PHP
| import { Directive, ElementRef, Input } from '@angular/core'; | |
| declare var ImgCache: any; | |
| @Directive({ | |
| selector: '[image-cache]' | |
| }) | |
| export class ImageCacheDirective { | |
| constructor ( | |
| private el: ElementRef |
| <?php | |
| /****************************************************************************************************************** | |
| * Source: http://www.emvee-solutions.com/blog/magento-custom-reindex-script/ | |
| * | |
| * Custom Magento re-indexing script | |
| ******************************************************************************************************************/ | |
| //Place this file in your Magento root folder, or modify the require once to match your directory. | |
| git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv |
| SELECT sub_query.month_ordered, | |
| sub_query.year_ordered, | |
| SUM(sub_query.base_subtotal) AS sum_base_subtotal, | |
| SUM(sub_query.discount_amount) AS sum_discount_amt, | |
| SUM(sub_query.order_qty) AS sum_total_item_count, | |
| COUNT(sub_query.entity_id) AS total_orders | |
| FROM | |
| (SELECT so.entity_id, | |
| MONTH(so.created_at) AS month_ordered, | |
| YEAR(so.created_at) AS year_ordered, |
السلام عليكم ، هذا كود ريجيكس بسيط للتحقق من صحة أرقام الجوالات السعودية ، يقوم الريجيكس بالتحقق من مفتاح الدولة ، مفتاح شركة الإتصالات لضمان صحة النص المدخل .
Hello, this is a simple regex to validate saudi mobile numbers, the code will validate country code, telecome company code and make sure the tested sting is correct .
/^(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/
| <?php | |
| define('MAGENTO', realpath(dirname(__FILE__))); | |
| require_once MAGENTO . '/app/Mage.php'; | |
| Mage::app(); | |
| $category = Mage::getModel ('catalog/category'); | |
| $tree = $category->getTreeModel(); | |
| $tree->load(); |
| delimiter ;; | |
| drop procedure if exists build_catalog;; | |
| create procedure build_catalog(IN categories INT, IN products INT) | |
| begin | |
| SET @category_count = 1; | |
| SET @CATNAMEPREFIX = "Category "; | |
| SET @CATURLKEYPREFIX = "cat-"; | |
| SET @CATURLPATHPREFIX = "catpath-"; | |
| SET @ROOTCATEGORY = 2; | |
| SET @INCLUDEINMENU = 1; |