Postări

Se afișează postări din 2018

Upgrade magento to 2.2.5 with composer

composer require magento/product-community-edition 2.2.5 --no-update composer update rm -rf var/di var/generation php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento indexer:reindex

certbot renew

certbot certonly --webroot -w /path/to/your/webroot -d example.com --post-hook="service nginx reload"

nginx for prestashop 1.7

server { listen 80; client_max_body_size 200m; root /Users/path/app; index index.php; index index.php index.html index.htm; error_log log.error error; server_name my.server; location /admin12345/ { #Change this to your admin folder if (!-e $request_filename) { rewrite ^/.*$ /admin12345/index.php last; #Change this to your admin folder } } location / { autoindex on; # Old image system ? rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+...

upgrade magento 2 by command line

composer require magento/product-community-edition 2.2.3 --no-update composer update rm -rf var/di var/generation php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile(Optional) php bin/magento indexer:reindex chmod -R 777 var php bin/magento setup:static-content:deploy php bin/magento --version

convert apostrophe and other character encoded to utf-8 normal symbols

$string = '&#0192; &#0162;A &#039;quote&#039; is <b>bold</b>' ; echo html_entity_decode ( $string , ENT_QUOTES ).PHP_EOL; echo mb_convert_encoding ( $string , "UTF-8" , "HTML-ENTITIES" ); À ¢A 'quote' is <b>bold</b> À ¢A 'quote' is <b>bold</b>

remove ds_store files from git

echo .DS_Store >> ~/.gitignore_global git config --global core.excludesfile ~/.gitignore_global

Ntfs mount read on mac os x

brew cask install mounty http://enjoygineering.com/mounty/