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
/* Set a height */ | |
/* Ellipsis to one line text */ | |
.equal { | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
overflow: hidden; | |
} | |
/* Ellipsis to multiline text */ |
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
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
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c31c1e292ad7be5f49291169c0ac8f683499edddcfd4e42232982d0fd193004208a58ff6f353fde0012d35fdd72bc394') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
sudo php composer-setup.php --version=1.10.17 --install-dir=/usr/bin --filename=composer | |
php -r "unlink('composer-setup.php');" | |
composer --version | |
Composer version 1.10.17 2020-10-30 22:31:58 | |
whereis 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
kill -9 $(ps -aux | grep 'bin/magento' | 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
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
<?php | |
/* | |
* Controller | |
*/ | |
// $_SERVER | |
$this->getRequest()->getServer('SERVER_NAME'); |
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
echo '<?php phpinfo(); ?>' > ~/public_html/xinfo.php | |
rm ~/public_html/xinfo.php |
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
CREATE TABLE IF NOT EXISTS new_table LIKE existing_table; | |
INSERT new_table SELECT * FROM existing_table; |
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
docker run --rm -v $PWD:/code:ro domw/phpcompatibility phpcs --standard=PHPCompatibility --runtime-set testVersion 5.6-7.3 --colors --warning-severity=0 --report=full,summary --extensions=php,phtml ./ |
NewerOlder