server {
listen 80;
root /Users/admin/htdocs/vax-uk;
index index.php index.html index.htm;
server_name vax.local;
access_log /usr/local/etc/nginx/logs/vax_access.log;
access_log /usr/local/etc/nginx/logs/vax_error.log;
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
| -- Set new size. Need to check after resize. | |
| $ convert icon.png -define jpeg:extent=50kb -resize 1090x1090 icon_new.jpg |
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 | |
| // Base-name | |
| $name = 'foobar'; | |
| // Init Magento | |
| require_once 'app/Mage.php'; | |
| Mage::app(); | |
| Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
| // Create the root catalog |
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 magento19.ll; | |
| root /var/www/magento19; | |
| index index.html index.php; | |
| autoindex off; | |
| location ~ (^/(app/\|includes/\|lib/\|/pkginfo/\|var/\|report/config.xml)\|/\.svn/\|/\.git/\|/.hta.+) { |
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 | |
| // source: https://code.google.com/archive/p/php-slugs/ | |
| function my_str_split($string) | |
| { | |
| $slen=strlen($string); | |
| for($i=0; $i<$slen; $i++) | |
| { | |
| $sArray[$i]=$string{$i}; | |
| } |
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
| #Interactive switching mode | |
| sudo update-alternatives --config php | |
| # | |
| sudo update-alternatives --set php /usr/bin/php7.4 | |
| sudo update-alternatives --set phar /usr/bin/phar7.4 | |
| sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.4 |
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
| bin/magento setup:install \ | |
| --base-url=http://magento.ll \ | |
| --backend-frontname=admin \ | |
| --db-host=localhost \ | |
| --db-name=magento \ | |
| --db-user=magento \ | |
| --db-password=magento \ | |
| --admin-firstname=admin \ | |
| --admin-lastname=admin \ | |
| [email protected] \ |
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
| bin/magento dev:urn-catalog:generate .idea/misc.xml |
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
| find . -name \*.gz -print0 | xargs -0 zgrep "some_text" |
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
| ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }' |
OlderNewer