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
| Find what's listening on port 8080 | |
| ================================== | |
| sudo lsof -P -iTCP -sTCP:LISTEN | grep -i 8080 | |
| ex. output | |
| ---------- | |
| php 8046 username 5u IPv4 0xd9c3cdd5c98d4b65 0t0 TCP localhost:8080 (LISTEN) | |
| Kill It | |
| ======= |
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
| $this->assertSession()->waitForElementVisible('css', '.non-exist-element', 9999999999999); |
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
| run: | |
| chromedriver --port=4444 | |
| in php.local.xml: | |
| <env name="MINK_DRIVER_ARGS_WEBDRIVER" value='["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://localhost:4444"]'/> |
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
| DRUSH SSET | |
| drush sset STATE_NAME VAL | |
| ex. | |
| drush sset ftp_module_name.settings.ftp_last SV20190901.TXT | |
| DRUSH EV | |
| drush ev "\Drupal::state()->set('STATE_NAME', 'VAL')"; | |
| ex. |
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
| Add a single value to an existing multi-value field | |
| --------------------------------------------- | |
| $value = 'text'; | |
| $profile = Profile::load(uid); | |
| $profile->get('field_name')->appendItem($value); | |
| Add values to a multi-value during entity creation | |
| -------------------------------------------------- |
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
| drush sqlq "DELETE FROM semaphore WHERE name = 'cron';" |
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
| https://www.drupal.org/forum/support/theme-development/2016-05-12/theming-custom-block-types#comment-11184655 | |
| /** | |
| * Implements hook_theme_suggestions_HOOK_alter() | |
| * @param array $suggestions | |
| * @param array $variables | |
| */ | |
| function THEMENAME_theme_suggestions_block_alter(array &$suggestions, array $variables) { | |
| // Block suggestions for custom block bundles. | |
| if (isset($variables['elements']['content']['#block_content'])) { |
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
| echo -n 'input_here' | openssl base64 |
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
| Problem: | |
| -------- | |
| Trying to get a test to use a custom handler, defaultConfiguration() | |
| in QuizFormHandler references a configuration setting called 'training_program'. | |
| In order for this to work properly during install, Drupal needs to know the schema | |
| of any handlers that have configuration settings | |
| Webform missing schema error | |
| ---------------------------- | |
| Drupal\Core\Config\Schema\SchemaIncompleteException : |
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 8 - Used to check all boxes, to grant all permissions | |
| # to authenticated user on /admin/people/permissions | |
| jQuery('input.rid-authenticated').each(function(e){ | |
| jQuery(this).prop("checked", true) | |
| }); |