Disable Quit shortcut on PhpStorm in MacOS

PhpStorm is a widely used IDE for PHP Developers and provides a variety of customisations built-in. But adding a default keymap for Cmd+Q also triggers the mac shortcut for quitting an application. I'm used to configure this kepmap for opening the `Structure` of the file, but when i press Cmd+Q, the additional confirm box for "Quit PhpStorm" appears along with it which is a bit of a pain. Hence, we need to disable the default quit shortcut in MacOS.

Disable Quit shortcut on PhpStorm in MacOS

Perform the following steps to disable quit shortcut on PhpStorm in MacOS -

How to display errors in PHP?

Executing a PHP file can result in an error and there are cases when you don't get any information about the things that went wrong in the process as you could see a blank page or any weird things on the browser. This page explains how to display errors in PHP.

How to display errors in PHP?

These errors are logged in the PHP log file or the server log file, but you can simply make changes to your code to quickly view it on the browser.

How to cherry-pick commit from Github Repository

Many a times, there are changes made to the code on the GitHub repository which you would need to apply on your cloned git version to continue the work done by the others. This requires cherry-pick a commit hash from github. This page helps in knowing how you can cherry-pick commit from Github repository and start with your work on top of it.

PHP Error Log file location in Nginx

PHP error log file location is same as Nginx error log. The Nginx error log and access log file is located at -


To open the file using less command, you can use the +G option to check the latest entries made in the file -

$ less +G /var/log/nginx/error.log

or simply view the last 100 lines using tails command -

tail /var/log/nginx/error.log -n 100


Compress Extract files using tar command

The command "tar" on Linux or Mac OS terminal is used to compress the folder into a tar/archive file. This page helps in the basic usage and explains how to compress extract files using tar command. The description from the man page says - 

tar creates and manipulates streaming archive files.  This implementation can extract from tar, pax, cpio, zip, jar, ar, xar, rpm, 7-zip, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, 7-zip, and shar archives.

Disable elements on drupal webform

Drupal 8 provides an easy way to simply edit the component or element on the drupal webform and disable elements using the checkbox displayed on the form.


disable elements

However, there could be different scenarios where we might need to disable few elements on specific cases that might not available on drupal webform conditional. Eg - Disable elements for certain user roles.