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 | |
use Behat\Mink\Exception\ExpectationException; | |
use Behat\MinkExtension\Context\RawMinkContext; | |
// Located at ./features/bootstrap/ | |
/** | |
* FeatureContext class defines custom step definitions for Behat. | |
*/ |
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 | |
/** | |
* Set redis configuration. | |
*/ | |
/** @see: https://docs.platform.sh/frameworks/drupal8/redis.html */ | |
if (extension_loaded('redis')) { | |
// Set Redis as the default backend for any cache bin not otherwise specified. | |
// $settings['cache']['default'] = 'cache.backend.redis'; |
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 | |
use Drupal\DrupalExtension\Context\RawDrupalContext; | |
use Behat\Behat\Context\SnippetAcceptingContext; | |
use Behat\Gherkin\Node\PyStringNode; | |
use Behat\Gherkin\Node\TableNode; | |
use Behat\Mink\Exception\ElementNotFoundException; | |
use Behat\Mink\Exception\ExpectationException; | |
use Behat\Behat\Event\StepEvent; |
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
drupal chain --file=~/.console/chain/quick-start-mysql.yml | |
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
input.form-submit.button-small { | |
padding: 4px 8px; | |
font-weight: bold; | |
} | |
.container-inline input.form-submit.button-small + .ajax-progress.ajax-progress-throbber .throbber { | |
position: absolute; | |
left: 19px; | |
margin-top: 7px; | |
} |
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
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) === | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated September 2024 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
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 | |
/** | |
* @Given /^I am logged in as a user in the "(?P<group>[^"]*)" group$/ | |
*/ | |
public function iAmLoggedInAsAUserInTheGroup($group) { | |
// Create user. | |
$account = (object) array( | |
'pass' => $this->getDrupal()->random->name(), | |
'name' => $this->getDrupal()->random->name(), | |
); |
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
Given /^(?:|I )am on "(?P<page>[^"]+)"$/ | |
Given /^(?:|I )am on (?:|the )homepage$/ | |
Given :type content: | |
Given :vocabulary terms: | |
Given I am an anonymous user | |
Given I am at :path | |
Given I am logged in as :name | |
Given I am logged in as a user with the :permissions permission(s) | |
Given I am logged in as a user with the :role role(s) | |
Given I am logged in as a user with the :role role(s) and I have the following fields: |
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
# @file | |
# NGINX Configuration file for Drupal 8 | |
# Redirect index to php. | |
location / { | |
try_files $uri @rewrite; | |
} | |
# Allow but don't log access to /favicon.ico and /robots.txt | |
location ~ (^/favicon\.ico$|^/robots\.txt$) { |
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 | |
if (!function_exists('array_group_by')) { | |
/** | |
* Groups an array by a given key. | |
* | |
* Groups an array into arrays by a given key, or set of keys, shared between all array members. | |
* | |
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function. | |
* This variant allows $key to be closures. |
NewerOlder