Skip to content

Instantly share code, notes, and snippets.

View FredericMartinez's full-sized avatar

Frédéric MARTINEZ FredericMartinez

View GitHub Profile
@FredericMartinez
FredericMartinez / TinyMCEPlugin
Created March 18, 2021 10:15
Remove <p> WYSIWYG Magento2, plugin edition
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Ui\Component\Wysiwyg\ConfigInterface">
<plugin name="mynamespace_tinymce_settings"
type="Namespace\Backend\Plugins\TinyMCEPlugin"
sortOrder="10"/>
</type>
</config>
@FredericMartinez
FredericMartinez / tinymce4Adapter.js
Last active March 17, 2021 15:10
Remove <p> WYSIWYG Magento 2
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*
* => app/design/adminhtml/Namespace/project_name/web/mage/adminhtml/wysiwyg/tiny_mce/tinymce4Adapter.js
*/
/* global popups, tinyMceEditors, MediabrowserUtility, Base64 */
/* eslint-disable strict */
define([

Use both files in your root folder and run:

curl -LO https://deployer.org/deployer.phar && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep
composer require deployer/recipes --dev
composer require rafaelstz/deployer-magento2 dev-master --dev

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c995c760fe380769852bcdb26a2278/packages/gatsby/src/util
@FredericMartinez
FredericMartinez / Magento1ValetDriver.php
Created November 9, 2018 12:04 — forked from spinsch/Magento1ValetDriver.php
Laravel Valet Driver for Magento 1
<?php
/*
* Magento 1 Valet Driver
* @author spinsch
* @path ~/.valet/Drivers/Magento1ValetDriver.php
*/
class Magento1ValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
@FredericMartinez
FredericMartinez / unbuffered_shell_example.php
Created January 31, 2018 17:56 — forked from cmtickle/unbuffered_shell_example.php
Use unbuffered SQL queries with Magento to reduce memory usage on large data sets.
<?php
require_once 'abstract.php';
class Cmtickle_Demo_Shell_Tool extends Mage_Shell_Abstract
{
private $_readConnection = null;
protected function _getReadConnection()
{
@FredericMartinez
FredericMartinez / .htaccess
Created June 24, 2017 18:19
[Magento2] If you delete .htaccess in pub/static folder...
<IfModule mod_php5.c>
php_flag engine 0
</IfModule>
<IfModule mod_php7.c>
php_flag engine 0
</IfModule>
# To avoid situation when web server automatically adds extension to path
Options -MultiViews