This file contains hidden or 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
# For example: | |
## my-bash.sh | |
```bash | |
echo "Hello world" | |
exit 0 | |
``` | |
## Run command | |
bash my-bash.sh && echo "Good bye" |
This file contains hidden or 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
1. Install platform-specific dependencies: | |
sudo apt-get install \ | |
libcurl4-openssl-dev \ | |
libonig-dev \ | |
libjpeg-dev \ | |
libjpeg8-dev \ | |
libjpeg-turbo8-dev \ | |
libpng-dev \ | |
libicu-dev \ |
This file contains hidden or 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
server { | |
listen 80; | |
server_name m241cc.local; | |
set $MAGE_ROOT /var/www/m241cc; | |
set $MAGE_DEBUG_SHOW_ARGS 0; | |
# | |
## Optional override of deployment mode. We recommend you use the | |
## command 'bin/magento deploy:mode:set' to switch modes instead. | |
## |
This file contains hidden or 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 Demo\Demo\Cron; | |
// Need move to CleanTableCronJobTest class | |
use Magento\Catalog\Model\ProductRepository; | |
use Magento\Store\Model\StoreManagerInterface; | |
class CleanTableCronJob | |
{ |
This file contains hidden or 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
-- Product entity type ID | |
SET @etype = (SELECT | |
entity_type_id | |
FROM | |
eav_entity_type | |
WHERE | |
entity_type_code = 'catalog_product'); | |
-- Product name attribute ID | |
SET @name = (SELECT | |
attribute_id |
This file contains hidden or 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
git log | |
git reset --soft HEAD~N | |
Change code, add everything and commit code | |
git add <file> | |
git commit -m "new commit" | |
git push orign <branch> -f | |
N: number commit you want to reset |
This file contains hidden or 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
scl enable rh-php72 bash | |
scl enable php72 bash |
This file contains hidden or 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
1, Create code for data patch | |
Setup/Patch/Data | |
2, Install data patch | |
bin/magento set:up | |
Check patch is installed in table: patch_list | |
3, Update dat patch | |
Go to table: patch_list delete Patch | |
Change code |
This file contains hidden or 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
yum install php73-pecl-apcu.x86_64 |
This file contains hidden or 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
vim /etc/ngin/fastcgi_params | |
fastcgi_param REMOTE_ADDR $http_true_client_ip; |