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
| import { Directive, ElementRef, Input } from '@angular/core'; | |
| declare var ImgCache: any; | |
| @Directive({ | |
| selector: '[image-cache]' | |
| }) | |
| export class ImageCacheDirective { | |
| constructor ( | |
| private el: ElementRef |
Firstly install Brew on your MAC
Then install PHP
| <?php | |
| /** | |
| * @author Godric Cao | |
| */ | |
| namespace Vendor\Namespace\Model\Subscription\Order; | |
| class Create | |
| { | |
| public function __construct( | |
| \Magento\Framework\App\Helper\Context $context, |
| ########################################################## | |
| # PRODUCTS | |
| ########################################################## | |
| DELETE FROM `catalog_product_bundle_option`; | |
| DELETE FROM `catalog_product_bundle_option_value`; | |
| DELETE FROM `catalog_product_bundle_selection`; | |
| DELETE FROM `catalog_product_entity_datetime`; | |
| DELETE FROM `catalog_product_entity_decimal`; | |
| DELETE FROM `catalog_product_entity_gallery`; | |
| DELETE FROM `catalog_product_entity_int`; |
| <?php | |
| #API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = $_GET['id']; | |
| #prep the bundle | |
| $msg = array | |
| ( | |
| 'body' => 'Body Of Notification', |
| <?php | |
| defined('STDIN') or die(_("Access Denied. CLI Only")); | |
| // execute from the command line: php <path to magento root>/cli/create_attributes.php | |
| require __DIR__.'/../app/bootstrap.php'; // assuming this file is in /cli under the root magento dir | |
| $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
| $installer = $bootstrap->getObjectManager()->create('Magento\Catalog\Setup\CategorySetup'); | |
| $objectManager = $bootstrap->getObjectManager(); |
🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert and mkcert -install. Keep it simple!
This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.
sudo nano /etc/ssl/localhost/localhost.conf
| #!/bin/bash | |
| # ---------------------------------------------------- | |
| # v. 20180308 | |
| TARGET=/var/www/html | |
| TMPTARGET=/var/www/codedeploy | |
| BACKUP=/var/www/html-backup | |
| USER=apache | |
| GROUP=apache | |
| # ---------------------------------------------------- |
| <?php | |
| /** | |
| * Use | |
| */ | |
| class Module_Adminhtml_Block_Config_Data extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract | |
| { | |
| protected $_textareaRenderer; | |
| public function __construct() | |
| { |
| <?php | |
| namespace Vendor\Module\Plugin; | |
| class CsrfValidatorSkip | |
| { | |
| /** | |
| * @param \Magento\Framework\App\Request\CsrfValidator $subject | |
| * @param \Closure $proceed | |
| * @param \Magento\Framework\App\RequestInterface $request | |
| * @param \Magento\Framework\App\ActionInterface $action |