ngrok creates a tunnel from the public internet to your local machine.
Sign up for an ngrok account https://dashboard.ngrok.com/
brew install ngrok/ngrok/ngrok
ngrok creates a tunnel from the public internet to your local machine.
Sign up for an ngrok account https://dashboard.ngrok.com/
brew install ngrok/ngrok/ngrok
To configure the error messages visibility, set an appropriate configuration in the settings.php
file
// Show all error messages, including notices and coding standards warnings.
$config['system.logging']['error_level'] = 'verbose';
File: /path/to/docroot/sites/<SITE_NAME>/settings.php
.
Then clear the Drupal cache.
One of the ways to create an immediately executed anonymous function
(function() {
'use strict';
// ...
})();
“There are only two hard things in Computer Science: cache invalidation and naming things.”
— Phil Karlton
“One of life's greatest sources of satisfaction is the knowledge that something you have created is contributing to the progress or welfare of society.”
— Donald Knuth
-- Remove all watchdog's records from a MySQL table except for the last 500. | |
DELETE FROM `watchdog` | |
WHERE wid NOT IN ( | |
SELECT wid | |
FROM ( | |
SELECT wid | |
FROM `watchdog` | |
ORDER BY wid DESC | |
LIMIT 500 |
<?php | |
use Drupal\Core\Database\Database; | |
use Drupal\Core\Database\Query\SelectInterface; | |
/** | |
* Returns a plain SQL query from a Select query object. | |
*/ | |
function get_plain_sql_query(SelectInterface $query): string | |
{ |