I’ve completed a PHP Yii2 Framework Advanced course and certification on an ITVDN platform.
Previously, I’ve created my first own Yii2 Framework Essentials course on the ITVDN platform.
web development and system administration of Linux
I’ve completed a PHP Yii2 Framework Advanced course and certification on an ITVDN platform.
Previously, I’ve created my first own Yii2 Framework Essentials course on the ITVDN platform.
To search commits by the author you can use the following command:
# git log --author="Taras Shkodenko"
where Taras Shkodenko example author name.
To get the list of all authors in a current Git repository use the useful command below:
# git shortlog -sne --all
Today I’ve complete PHP Symfony Developer Certification on ITVDN Platform.

Git has a useful feature. You can stash not committed changes and then re-apply them. It helps you to restore the working directory and the index, to a clean working directory as it was before your not commited changes.
To stash your changes run a command below:
# git stash
To apply (unstash) your changes run a command below:
# git stash apply
To view list of stashes run a following command:
# git stash list
Read more about git stash on a documentation page.
To copy file from you host computer to a container use command docker cp
docker cp file.txt ${CONTAINER_ID}:/root/file.txt
Replace ${CONTAINER_ID} with ID of the container. You can get container name using command:
docker ps -a
Example of a virtual host for web server Apache version 2.4 config to run a development copy of WordPress CMS:
<VirtualHost *:81>
ServerName wpdev.test
ServerAlias *.wpdev.test
# Indexes + Directory Root.
DirectoryIndex index.php index.html
DocumentRoot "/Users/taras/wpdev/public_html"
ErrorLog "/usr/local/var/log/httpd/wpdev.test/error.log"
CustomLog "/usr/local/var/log/httpd/wpdev.test/access.log" common
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9074"
</FilesMatch>
Options FollowSymLinks
</VirtualHost>
To list installed composer libraries use command below:
composer show -i
You can use ?: ternary operator in PHP then you need not empty value. Set value to a $action variable from $_POST[‘action’] parameter if it is not empty or use string default instead. It is shown in the example code below:
// Example usage for: Ternary Operator $action = (empty($_POST['action'])) ? 'default' : $_POST['action'];
For more information see PHP documentation page for Ternary Operator.
In PHP 5.3, a shorter syntax for the ternary operator was introduced, which allows to leave out the middle part of the ternary operator for a quick shorthand evaluation. It is also called the Elvis operator sometimes because:
Then I’ve developed MySQL backup script I’ve faced an error:
mysqldump: Got error: 1045: "Access denied for user '...'@'localhost' (using password: YES)" when using LOCK TABLES
which was fixed by adding
--lock-tables=false
parameter to mysqldump command.
Also, if you dump InnoDB tables consider using the
--single-transaction=true
parameter. As it is described in MySQL 5.7 documentation page.
To update WordPress CMS core, plugin and theme translations the following commands can be used:
# wp language plugin --all update # wp language theme --all update # wp language core update