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
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
<?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
<?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); |
NewerOlder