Skip to content

Instantly share code, notes, and snippets.

Jody Hamilton jodyHamilton

Block or report user

Report or block jodyHamilton

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View drupal-mock-request-time-for-tests.patch
diff --git a/includes/ b/includes/
index 728e4ec..394d746 100644
--- a/includes/
+++ b/includes/
@@ -215,7 +215,9 @@ define('LANGUAGE_RTL', 1);
* @see
* @see
-define('REQUEST_TIME', (int) $_SERVER['REQUEST_TIME']);
+ // Moved to a phase of drupal_bootstrap so that we can pull this from a
name: Bear Skin type: theme
description: 'Bear Skin Starter Theme.'
Custom core: 8.x
engine: twig
screenshot: screenshot.png
- core/modules/system/css/components/messages.theme.css
- core/modules/system/css/components/menu.theme.css
View probo.yaml
- zivtech8x.sql.gz
- name: Setup working directory
command: "drush fec --json-config='{\"settings_php.snippets\": []}' --local-environment=probo zivtech 7 "
- name: Import the database
command: 'gunzip -c $ASSET_DIR/zivtech8x.sql.gz | `drush --root=/var/www/zivtech/webroot sql-connect` ; rm $ASSET_DIR/zivtech8x.sql.gz'
- name: Move code in place
command: 'rm -rf /var/www/zivtech/code ; mv $SRC_DIR /var/www/zivtech/code'
- name: Rewrite settings.php file and repair symlinks
View Probo yaml behat selenium
- name: Run behat tests
command: 'cd /var/www/html/tests ; composer install ; ./bin/behat --profile probo --tags "~@javascript"'
- name: Run behat js tests
command: 'wget ; apt-get install xvfb -y ; xvfb-run java -jar selenium-server-standalone-2.48.2.jar & ; ./bin/behat --profile probo --tags "@javascript" ; disown'
jodyHamilton / .probo.yml
Last active Apr 14, 2017
A Wordpress Probo Config
View .probo.yml
- aap.sql
- name: Set up site with WordPress plugin
plugin: WordPressApp
devDomain: ''
devHome: ''
database: 'aap.sql'
databaseName: 'aap'
databaseGzipped: false
View wp-config.probo.php
define('WP_CACHE', false); // Added by W3 Total Cache
define('WP_HOME', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']);
View paragraphs-not-orderable.patch
diff --git a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
index 48d6d2c48..f72b86d8a 100644
--- a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
+++ b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
@@ -879,7 +879,7 @@ public function formMultipleElements(FieldItemListInterface $items, array &$form
if ($this->realItemCount > 0) {
$elements += array(
- '#theme' => 'field_multiple_value_form',
+ '#theme' => $this->fieldDefinition->isOrderable() ? 'field_multiple_value_form' : 'field_multiple_value_without_order_form',
jodyHamilton / NumberCommasWidget.php
Created Apr 20, 2017
Drupal 8 number field widget that uses commas to separate thousands
View NumberCommasWidget.php
namespace Drupal\YourModule\Plugin\Field\FieldWidget;
use Drupal\Core\Field\FieldFilteredMarkup;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\WidgetBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget;
jodyHamilton / Drupal 8 inline_form_errors with field_group
Last active May 1, 2017
Drupal 8 inline_form_errors with field_group
View Drupal 8 inline_form_errors with field_group
// Inline_form_errors module gives links to elements with errors.
// When using field_group module (this is for vertical tabs) you need to first open the right vertical tab
// and then scroll to the element with the error.
$('.messages__list a', context).on('click', function(e) {
var url = $(this).attr('href');
var hash = url.substring(url.indexOf('#'));
var index = $(hash).parents('.vertical-tabs__pane').index() - 1;
if (index >= 0) {
$('ul.vertical-tabs__menu li').eq(index).find('a').click();
You can’t perform that action at this time.