Skip to content

Instantly share code, notes, and snippets.

View mherchel's full-sized avatar

Michael Herchel mherchel

View GitHub Profile

Remove default layouts

/**
 * Implements hook_plugin_filter_TYPE__CONSUMER_alter()
 */
function custom_layouts_plugin_filter_layout__layout_builder_alter(&$definitions) {

  // Remove layouts that are NOT provided by this module.
 foreach ($definitions as $id => &$definition) {
/* eslint-env node, es6 */
/* global require */
'use strict';
/**
* Configuration
*/
// Load dependencies
const { parallel, series, src, dest, task, watch, } = require('gulp');
@mherchel
mherchel / YOURTHEMENAME.theme
Last active January 5, 2019 15:25
Strip extraneous divs from field templates
/**
* Implements hook_theme_suggestions_alter().
*/
function YOURTHEMENAME_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
if ($hook === 'field') {
switch ($field_name) {
case 'field_bio_media':
case 'field_media_image':
case 'field_hero_media':
case 'field_promo_media':
Matthew Glaman brings a holistic approach to the omnichannel dynamic blockchain. Through end to end data neural networks, Matthew reimagines the global paradigm of algorithmic synergistic AI. He is a reactive unicorn that empowers the clear goal of pushing the envelope of organic growth on the runway. With a mind share of sustainability he brings the elastic digital experience to the artisanal table. Blockchain.
git fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done
(function($){
Drupal.behaviors.addMoreRows = {
attach: function(context, settings) {
var $tripletWrapper = $('.js-advanced-triplet-wrapper', context);
var $removeButton = $('.js-advanced-button-remove', context);
var $addButton = $('.js-advanced-button-add', context);
var $clearButton = $('#gnus-advanced-search-form-advanced-form button[type="reset"]', context);
// Add additional option with correct text to each field select element
# Path to your oh-my-zsh installation.
export ZSH=/Users/mherchel/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# ZSH_THEME="random"
#Import MYSQL
gzcat foo.sql.gz | mysql -uroot -ppassword foo
{#
/**
* @file
* Theme override to display a menu.
*
* Available variables:
* - menu_name: The machine name of the menu.
* - items: A nested list of menu items. Each menu item contains:
* - attributes: HTML attributes for the menu item.
* - below: The menu item child items.
@echo off
::
:: Setup
::
:: 1. The remote computer must be networked with the local computer, and able to be accessed
:: using Windows File Sharing (SMB).
:: 2. Set the paths for the local and remote repository below, WITHOUT A LEADING SPACE
::
:: Directions for use
::