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
{# | |
Example component twig file: templates/components/card.html.twig | |
#} | |
<article class="card"> | |
{% if image %} | |
<img src="{{ image }}" class="card__image" alt="{{ title }}"> | |
{% endif %} | |
<div class="card__content"> | |
<h2>{{ title }}</h2> |
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 | |
namespace Drupal\jd_example\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; | |
/** | |
* Provides a 'ExampleBlock' block. | |
* | |
* @Block( |
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
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; |
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
<?xml version="1.0"?> | |
<ruleset name="james"> | |
<description>James Coding Standards</description> | |
<file>httpdocs/sites/all/modules/custom</file> | |
<file>httpdocs/sites/all/modules/features</file> | |
<file>httpdocs/sites/all/themes/custom</file> | |
<arg name="colors" /> | |
<arg value="np"/> |
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 | |
// Logs a notice | |
\Drupal::logger('my_module')->notice($message); | |
// Logs an error | |
\Drupal::logger('my_module')->error($message); | |
?> |
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
pv sqlfile.sql | mysql -uxxx -pxxxx dbname |