This file contains 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
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
This file contains 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 | |
// Example usage: $build = blocks_get_blocks_by_region('sidebar_first'); | |
function blocks_get_blocks_by_region($region_name) { | |
$build = []; | |
$blocks = entity_load_multiple_by_properties('block', ['theme' => $GLOBALS['theme'], 'region' => $region_name]); | |
uasort($blocks, 'Drupal\block\Entity\Block::sort'); | |
foreach ($blocks as $key => $block) { |
This file contains 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
npm uninstall -g gulp | |
npm install -g gulp | |
npm uninstall --save-dev gulp | |
npm install --save-dev gulp |
This file contains 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
@mixin quantity-query($selector, $type, $amount, $max: null) { | |
@if $type == at-least { | |
#{$selector}:nth-last-child(n+#{$amount}), | |
#{$selector}:nth-last-child(n+#{$amount}) ~ #{$selector} { @content; } | |
} @else if $type == at-most { | |
#{$selector}:nth-last-child(-n+#{$amount}):first-child, | |
#{$selector}:nth-last-child(-n+#{$amount}):first-child ~ #{$selector} { @content; } | |
} @else if $type == between { | |
@if type-of($max) != "number" { | |
@error "Max value must be a number for quantity-query."; |
###Installing Apache 2.4 + PHP 5.6 + MySQL + SSL on Mac OS X Yosemite This is a TL;DR version of an upcoming blog entry for those who can read bash commands and scripts.
This file contains 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 | |
/** | |
* Change a field from textfield to textarea | |
* Unlike other guides online, this one actually corrects the blob values | |
* Run this using drush: `drush scr <filepath>` | |
*/ | |
$field_name = "field_test_text_field_2"; |
This file contains 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
/** | |
* For more information see this tutorial: http://blog.webbb.be/use-jekyll-with-gulp/ | |
* | |
* Libs import | |
* --> How to install? npm install --save-dev gulp-minify-html | |
* @type {[type]} | |
*/ | |
var gulp = require('gulp'), | |
path = require('path'), |
NewerOlder