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
| function gpatch | |
| wget -O - $argv[1] | git apply --index -3 | |
| end |
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
| if status --is-interactive | |
| set PATH $PATH ~/bin; | |
| set PATH $PATH ~/.composer/vendor/bin | |
| set PATH $PATH ~/anaconda/bin | |
| set PATH $PATH ~/.cabal/bin | |
| set PATH $PATH ~/.platformsh/bin | |
| # set PATH $PATH /usr/local/sbin | |
| end | |
| ulimit -n 65536 |
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 | |
| /** | |
| * Provides an AMP Google DoubleClick for Publishers block | |
| * | |
| * @Block( | |
| * id = "amp_google_doubleclick_block", | |
| * admin_label = @Translation("AMP Google DoubleClick for Publishers 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
| /** | |
| * Implements hook_query_TAG_alter(). | |
| */ | |
| function custom_comment_query_comment_filter_alter(SelectQueryInterface $query) { | |
| // Reverse the order in which comments are displayed. | |
| $node = $query->getMetaData('node'); | |
| if ($node->type == 'lesson') { | |
| $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED); | |
| if ($mode === COMMENT_MODE_FLAT) { | |
| $field = 'c.cid'; |
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\foo_video\Plugin\Field\FieldWidget; | |
| use Drupal\Core\Entity\FieldableEntityInterface; | |
| use Drupal\Core\Field\FieldDefinitionInterface; | |
| use Drupal\Core\Field\FieldItemListInterface; | |
| use Drupal\Core\Field\WidgetBase; | |
| use Drupal\Core\Form\FormStateInterface; | |
| use Drupal\Core\Form\OptGroup; |
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 | |
| /** | |
| * @param \Drupal\Core\Url[][] $urlss | |
| */ | |
| function foo($urlss) { | |
| foreach ($urlss as $urls) { | |
| foreach ($urls as $url) { | |
| $url->getOptions(); | |
| } |
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\foo_article\Plugin\Field\FieldType; | |
| use Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem; | |
| use Drupal\workbench_moderation\Entity\ModerationState; | |
| /** | |
| * Defines the 'boolean' entity field type. | |
| * |
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
| diff --git a/core/lib/Drupal/Core/Condition/ConditionAccessResolverTrait.php b/core/lib/Drupal/Core/Condition/ConditionAccessResolverTrait.php | |
| index 106eeec..8cee282 100644 | |
| --- a/core/lib/Drupal/Core/Condition/ConditionAccessResolverTrait.php | |
| +++ b/core/lib/Drupal/Core/Condition/ConditionAccessResolverTrait.php | |
| @@ -26,8 +26,11 @@ protected function resolveConditions($conditions, $condition_logic) { | |
| $pass = $condition->execute(); | |
| } | |
| catch (ContextException $e) { | |
| - // If a condition is missing context, consider that a fail. | |
| - $pass = FALSE; |
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
| var notify = require('osx-notifier'); | |
| var cron = require('node-cron'); | |
| // Stand up every 30 minutes at least. | |
| cron.schedule('30 * * * *', () => { | |
| notify({ | |
| type: 'fail', | |
| title: 'Stand up', | |
| subtitle: 'Standup, do some excerise or at least drink some water, dude!', | |
| message: 'It is time for 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
| Query | |
| SELECT workbench_revision_tracker.entity_id AS workbench_revision_tracker_entity_id, node_field_data.nid AS nid, users_field_data_node_field_data.uid AS users_field_data_node_field_data_uid, node_field_revision_workbench_revision_tracker.vid AS node_field_revision_workbench_revision_tracker_vid | |
| FROM | |
| {node_field_data} node_field_data | |
| INNER JOIN {users_field_data} users_field_data_node_field_data ON node_field_data.uid = users_field_data_node_field_data.uid | |
| LEFT JOIN {workbench_revision_tracker} workbench_revision_tracker ON node_field_data.nid = workbench_revision_tracker.entity_id AND (workbench_revision_tracker.entity_type = 'node' AND workbench_revision_tracker.langcode = node_field_data.langcode) | |
| LEFT JOIN {node_field_revision} node_field_revision_workbench_revision_tracker ON workbench_revision_tracker.revision_id = node_field_revision_workbench_revision_tracker.vid AND (workbench_revision_tracker.entity_type = 'node' AND node_field_revision_workbench_revision_tracker.langcode = workbench_revisio |