- Find the commit a GitHub
- Add .patch to the URL
- Require vaimo/composer-patches
- Add an entry like the above, with path-removal-level 5, to the composer.json
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 | |
$allProductIds = Mage::getModel('catalog/product')->getCollection()->getAllIds(); | |
$attributeCode = 'some_eav_attribute'; | |
$attrData[$attributeCode] = 'some_value'; | |
$storeId = 0; | |
Mage::getSingleton('catalog/resource_product_action')->updateAttributes($allProductIds, $attrData, $storeId); |
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 Vendor\Module\Test\Unit; | |
use Magento\Framework\App\ObjectManagerFactory as AppObjectManagerFactory; | |
use Magento\Framework\Config\File\ConfigFilePool; | |
use Magento\Framework\ObjectManagerInterface; | |
use Magento\Framework\Filesystem\DriverPool; | |
use Magento\Framework\Filesystem\Driver\File; | |
use Magento\Framework\App\Filesystem\DirectoryList; |
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
wget -O - dev.mage2.com:1005/sitemap-1-1.xml | grep -E -o '<loc>.*</loc>' | sed -e 's/<loc>//g' -e 's/<\/loc>//g' > ~/sitemaps/mage2.txt | |
sudo siege -c100 -d5 -r1 -v -i -f ~/sitemaps/mage2.txt |
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/env bash | |
# Simple script to enable or disable the xdebug extension | |
case $1 in | |
on) | |
sudo sudo phpenmod xdebug | |
sudo service apache2 restart | |
echo "Xdebug is ON" | |
;; |
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 | |
declare(strict_types=1); | |
namespace Vendor\Module\Plugin\Checkout; | |
use Magento\Checkout\Model\DefaultConfigProvider; | |
use Magento\Framework\Stdlib\ArrayManager; | |
class AddProductLabelPlugin |
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 | |
require __DIR__ . "/app/bootstrap.php"; | |
use Magento\Framework\App\Bootstrap; | |
use Magento\Framework\App\ObjectManager\ConfigLoader; | |
use GuzzleHttp\Client; | |
use Magento\Framework\Stdlib\ArrayManager; | |
$bootstrap = Bootstrap::create(BP, $_SERVER); |
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
<Directory /home/usr/sites/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
AuthType Basic | |
AuthName "HTTP Auth" | |
AuthUserFile /etc/apache2/.htpasswd | |
SetEnvIf X-Forwarded-For ^1\.2\.3\.4 env_no_http_auth | |
<RequireAny> |
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
Cypress.Commands.add("loginAsCustomer", (username, password) => { | |
cy.request('/customer/account/login') | |
.its('body') | |
.then((body) => { | |
const $html = Cypress.$(body) | |
const formKey = $html.find('input[name="form_key"]').val() | |
cy.request({ | |
method: 'POST', | |
url: '/customer/account/loginPost', |
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 | |
command=$1 | |
path=$2 | |
currentDir="`pwd`" | |
# display usage | |
# run commands one after the other using | |
[ $# -eq 0 ] && { echo -e "Usage: $0 command [path]"; exit 1; } | |
case $command in |
OlderNewer