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
/** | |
* Revert Blog and Permission features. | |
*/ | |
function example_update_8005() { | |
/** @var \Drupal\features\FeaturesManagerInterface $manager */ | |
$manager = \Drupal::service('features.manager'); | |
$manager->import([ | |
'example_roles_permissions', | |
'example_blog', | |
]); |
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
// Courtesy of Clive at https://drupal.stackexchange.com/questions/56408/why-block-id-is-generating-with-encrypted-id | |
/** | |
* Implements hook_preprocess_block(). | |
*/ | |
function MYTHEME_preprocess_block(&$variables) { | |
if ($variables['block']->module == 'views') { | |
// Add some template suggestions that are a little easier to manage than | |
// the default dom ID added by views. | |
$delta = $variables['block']->delta; |
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_date_formats(). | |
*/ | |
function MODULE_date_formats() { | |
return [ | |
[ | |
'type' => 'MODULE_standard', | |
'format' => 'M d, Y', | |
'locales' => [], | |
], |
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
/// Add an SVG background image with a fallback for browsers that don't support SVG. | |
/// Note: This requires classes that Modernizr provides. | |
/// @author Matt Chapman | |
/// @param {String} $svgPath - The path to the SVG image. | |
/// @param {String} $pngPath - The path to the PNG image | |
/// @requires $svgPath | |
/// @requires $pngPath | |
/// @link https://gist.github.com/Chapabu/4923ac3a5d81d72a452e - Gist | |
@mixin svg-background-with-fallback($svgPath, $pngPath) { |
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
#! /usr/bin/env bash | |
PATH_TO_XDEBUG_SETTINGS="/usr/local/etc/php/5.6/conf.d/ext-xdebug.ini" | |
restart_apache(){ | |
echo "Restarting Apache" | |
sudo apachectl restart | |
} | |
all_done(){ | |
echo "All done!" |
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
{ | |
"viewports": [ | |
{ | |
"name": "phone", | |
"width": 320, | |
"height": 480 | |
}, | |
{ | |
"name": "tablet_v", | |
"width": 568, |
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 Farm\Providers; | |
use Illuminate\Support\ServiceProvider; | |
/** | |
* Class LocalServiceProviderProvider | |
* | |
* Service provider to allow us to register local environment specific providers (i.e. development dependencies). | |
* | |
* @package Farm\Providers |