MySQL empty or NULL

In mySQL empty or ” is differrent than NULL.
Empty means empty string but NULL means it is not set at all, not exist.

Git remote change url

git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

Smart live server updates through links

Use /var/www-production & /var/www-prerelease

Link /var/www.repo1 to /var/www-production and /var/www.repo2 to /var/www-prerelease.
Update /var/www-prerelease, test, do customizations.

When ready simply swap the links, move prerelease production and production to prerelease

Magento 1.9 RAM Table

products = RAM
up to 1000 = 8 GB
up to 50,000 = 16 GB
up to 100,000 = 32 GB
up to 250,000 = 48 GB
up to 500,000 = 64 GB
up to 750,000 = 96 GB
up to 999,999 = 128 GB

Magento Zend Framework Mappings

CE – Community Edition
PE – Professional Edition
EE – Enterprise Edition

CE 1.9 – ZF 1.12.3
CE 1.5 – CE 1.8 – ZF 1.11.1
CE 1.4.2.0 – ZF 1.10.8
CE 1.4.0.1 – ZF 1.9.6
CE 1.3.2.1 – ZF 1.7.2
CE 1.2.0.1 – ZF 1.7.2
CE 1.1.6 – ZF 1.5.1
CE 1.0.19870.4 – ZF 1.5.1

PE 1.11 – ZF 1.11.1
PE 1.10 – ZF 1.11.1

EE 1.14 – ZF 1.12.3
EE 1.10 – 1.13 – ZF 1.11.1
EE 1.9.1.1 – ZF 1.10.8

Php increase memory limit

<?php
 
ini_set('memory_limit','2048M');

WordPress change site url

UPDATE wp_options SET option_value = REPLACE(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
 
UPDATE wp_posts SET guid = REPLACE(guid, 'http://www.oldurl','http://www.newurl');
 
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.oldurl', 'http://www.newurl');
 
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value,'http://www.oldurl','http://www.newurl');

Git change remote url

git remote set-url origin https://username@hostname:port/project.git

Yii2 print ActiveRecord query sql output

<?php
 
echo $query->createCommand()->sql;

Beanstalkd stats and jobs delete

telnet localhost 11300
stats
 
peek-ready
FOUND 7 90
{"job":"Kleidoo\\Queue\\Job\\Shop\\Import\\ProductFeed","data":{"id":"303","revision":19}}
 
peek-delayed
FOUND 7 90
{"job":"Kleidoo\\Queue\\Job\\Shop\\Import\\ProductFeed","data":{"id":"303","revision":19}}
 
delete 7