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
| # General settings | |
| unbind C-b | |
| unbind l | |
| set -g prefix C-f | |
| bind-key C-a last-window | |
| set -g status-keys vi | |
| # Faster Command Sequences | |
| set -s escape-time 0 |
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', |