public function getLogger()
{
$writer = new \Zend_Log_Writer_Stream(BP . '/var/log/pixie.debug.log');
$logger = new \Zend_Log();
$logger->addWriter($writer);
return $logger;
}
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
# Patcher | |
composer require cweagans/composer-patches | |
git add -f ./vendor/magento/module-catalog/Model/ResourceModel/Product.php | |
# Edit file in vendor e.g. ./vendor/magento/module-catalog/Model/ResourceModel/Product.php | |
mkdir ./patches | |
mkdir ./patches/composer |
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
# Patcher | |
composer require cweagans/composer-patches | |
git add -f ./vendor/magento/module-catalog/Model/ResourceModel/Product.php | |
# Edit file in vendor e.g. ./vendor/magento/module-catalog/Model/ResourceModel/Product.php | |
mkdir ./patches | |
mkdir ./patches/composer |
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
$xml = new SimpleXMLElement('<note></note>'); | |
// Add a child element to the body element | |
$xml->addChild("date","2014-01-01"); | |
// Add a child element after the last element inside note | |
$footer = $xml->addChild("footer","Some footer text"); | |
// Add attribute to chosen element | |
$footer->addAttribute('type', 'stars'); | |
// render | |
echo $xml->asXML(); |
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
http://magento2.docker:9200/ | |
http://magento2.docker:9200/_cluster/health | |
http://magento2.docker:9200/_cat/nodes?v&pretty | |
http://magento2.docker:9200/_cat/indices?v&pretty | |
curl -s -X GET "magento2.docker:9200/[indice]/_search?q=sku:ABC123" | |
curl -s -X GET "127.0.0.1:9200/[indice]/_search?q=sku:ABC123" | |
curl -s -X GET "magento2.docker:9200/_cat/indices?v&pretty" | |
curl -s -X GET "magento2.docker:9200/_cat/nodes?v&pretty" |
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
# steps | |
curl -sL https://github.com/magento/magento-cloud/archive/2.4.0.tar.gz | tar xz | |
mv magento-cloud-2.4.0/{.,}* ./ | |
rm magento-cloud-2.4.0 -rf | |
wget -qO- https://magento.mirror.hypernode.com/releases/magento-2.4.0.tar.gz | tar xfz - | |
composer require magento/ece-tools symfony/config:^4.4 symfony/console:^4.0 symfony/dependency-injection:^4.3 symfony/process:^4.1 symfony/serializer:^4.0 symfony/yaml:^4.0 -v | |
./vendor/bin/ece-docker build:compose --mode="developer" --php="7.3" --nginx="1.19" --expose-db-port="3306" --no-varnish | |
docker-compose up -d | |
./bin/magento-docker |
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
Check IP address | |
curl | |
curl -s checkip.amazonaws.com | |
curl -s ipv4.icanhazip.com | |
curl -s http://ipv4.icanhazip.com | |
curl -s http://ipv6.icanhazip.com | |
curl -s https://checkip.amazonaws.com |
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
kill -9 $(ps -aux | grep 'bin/magento' | grep -v grep | awk '{print $2}') | |
kill -9 $(ps -aux | grep 'bin/magento cron:run' | grep -v grep | awk '{print $2}') |
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 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
sudo php composer-setup.php --version=1.10.26 --install-dir=/usr/bin --filename=composer | |
php -r "unlink('composer-setup.php');" | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
sudo php composer-setup.php --version=2.4.4 --install-dir=/usr/bin --filename=composer2 | |
php -r "unlink('composer-setup.php');" | |
composer --version |
NewerOlder