Skip to content

Instantly share code, notes, and snippets.

Dorian Damon ummdorian

Block or report user

Report or block ummdorian

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 gist:bc0259df3e52548f9a23b28b3dab368b
If composer memory limit:
If php memory limit:
php -d memory_limit=-1 $(which composer) {{ command goes here }}
ummdorian / index.php
Created Mar 28, 2018
Drupal 8 Query Alter Group By (views)
View index.php
function module_query_views_events_alter(Drupal\Core\Database\Query\AlterableInterface $query){
// If this the right query
$query->getMetaData('view') != ''
&& $query->getMetaData('view')->getDisplay()->display['id'] == 'block_3'
ummdorian / module_name.php
Created Feb 27, 2018
Views Nested Condition Group
View module_name.php
function adw_calendar_query_views_events_list_alter(Drupal\Core\Database\Query\AlterableInterface $query){
$query->getMetaData('view')->getDisplay()->display['id'] == 'page_1'
|| $query->getMetaData('view')->getDisplay()->display['id'] == 'page_2'
ummdorian / pantheon rsync files
Last active Feb 13, 2018
send files to pantheon via rsync
View pantheon rsync files
rsync -razv -e 'ssh -p 2222' --ignore-existing files live.*site_id**site_id*
ummdorian / gist:9e0b978efbf9191d43b4a01e2b5f7abd
Last active Oct 19, 2017
Responsive Background Image Swapping
View gist:9e0b978efbf9191d43b4a01e2b5f7abd
class="featured-media featured-media--full-height featured-media--align-center clearfix background-image-swap"
/sites/default/files/styles/2400x1600/public/2017-10/maxresdefault.jpg?itok=F7dLgnBM|all and (min-width: 1800px)|
/sites/default/files/styles/1800x1200/public/2017-10/maxresdefault.jpg?itok=iiH_TyjT|all and (min-width: 1201px) and (max-width: 1799px)|
/sites/default/files/styles/1200x800/public/2017-10/maxresdefault.jpg?itok=a5RsL9YX|all and (min-width: 961px) and (max-width: 1200px)|
/sites/default/files/styles/900x600/public/2017-10/maxresdefault.jpg?itok=tlhEVdgF|all and (min-width: 601px) and (max-width: 960px)|
ummdorian / Terminus site create commands for windows
Created Sep 20, 2017
Terminus site create commands for windows
View Terminus site create commands for windows
terminus site:create "--org"'"orgName"' "newSiteMachineName" "newSiteHumanName" "upstreamHash"
(windows cmd)
terminus site:create --org "orgName" "newSiteMachineName" "newSiteHumanName" "upstreamHash"
ummdorian / Lemme log in tho
Last active Jul 5, 2018
Windows powershell change drupal 8 user password
View Lemme log in tho
// update password
drush user-password username --password=password
// generate a hash to manually add to database
php core/scripts/ password
// url to reset
// drush change password
ummdorian / Fix for Drupal 8 decimal field validation.php
Last active Mar 7, 2017
Fix for Drupal 8 decimal field validation fix re: "invalid number error" addressed here:
View Fix for Drupal 8 decimal field validation.php
function hook_form_BASE_FORM_ID_alter()(array &$form, FormStateInterface $form_state){
$form['#validate'][] = 'module_remove_decimal_errors';
function module_remove_decimal_errors(array &$form, FormStateInterface $form_state) {
$errorsToRemove = array('field_your_field][0][value','field_your_other_field][0][value');
$errorsToKeep = array();
$currentErrors = $form_state->getErrors();
You can’t perform that action at this time.