Instantly share code, notes, and snippets.


ECK, Paragraphs, Blocks, and Custom Entities


  • best suited for custom relational entities
  • each ECK entity stands on its own
  • does not support translation (yet)
  • Use Inline Entity Form and Inline Entity Form Preview for best authoring experience.


  • best suited for enhancing content entry on individual entities
View gist:57f41b203a1c1348aeb52f9c0f634be7
// API access key from Google API's Console
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
View site-maintance.html
<!doctype html>
<title>Site Maintenance</title>
<meta charset="UTF-8">
<meta name="robots" content="noindex, nofollow">
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
View csv_to_array.php
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
* Example:
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
View BlogController.php
class BlogController extends Controller
* Posts
* @return void
public function showPosts()
View gulpfile.js ( simple )
* Gulp Packages
// General
var gulp = require('gulp');
var fs = require('fs');
var del = require('del');
var lazypipe = require('lazypipe');