Skip to content

Instantly share code, notes, and snippets.

View labboy0276's full-sized avatar

John Ouellet labboy0276

View GitHub Profile
debug: EVENTS => Error dispatching event listeners [post-install]. VError: Error running ad hoc container with kalabox/terminus:v0.9.0.: Error: "Processing failed."
at Object.<anonymous> (/home/john/kb2/node_modules/kalabox-engine-docker/docker.js:691:13)
From previous event:
at Object.use (/home/john/kb2/node_modules/kalabox-engine-docker/docker.js:690:11)
From previous event:
at /home/john/kb2/lib/engine.js:566:29
From previous event:
at Object.exports.use (/home/john/kb2/lib/engine.js:565:4)
at /home/john/kalabox/apps/pan-tester/plugins/kalabox-plugin-pantheon/lib/client.js:76:29
@labboy0276
labboy0276 / file.php
Created September 11, 2015 15:43
Change contextual filter to a Select list on Pane
/**
* Implements hook_form_FORMID_alter().
*/
function ccm_publications_form_views_content_views_panes_content_type_edit_form_alter(&$form, &$form_state) {
// Change this out to be a select list.
if (isset($form['arguments']['field_ccm_publication_type_tid'])) {
$v = taxonomy_vocabulary_machine_name_load('ccm_publication_type');
$terms = taxonomy_get_tree($v->vid);
foreach ($terms as $term) {
$vocab[$term->tid] = $term->name;
john@kalamuna:~/kalabox/apps/d8tester$ kbox terminus cli version
PHP Strict Standards: Non-static method Terminus::get_logger() should not be called statically, assuming $this from incompatible context in phar:///usr/local/bin/terminus/php/class-terminus-command.php on line 32
Strict Standards: Non-static method Terminus::get_logger() should not be called statically, assuming $this from incompatible context in phar:///usr/local/bin/terminus/php/class-terminus-command.php on line 32
PHP Strict Standards: Non-static method Terminus::get_outputter() should not be called statically, assuming $this from incompatible context in phar:///usr/local/bin/terminus/php/class-terminus-command.php on line 33
Strict Standards: Non-static method Terminus::get_outputter() should not be called statically, assuming $this from incompatible context in phar:///usr/local/bin/terminus/php/class-terminus-command.php on line 33
Terminus version: 0.8.0
Terminus script: terminus
@labboy0276
labboy0276 / gist:e831c5ac32dea7352bb5
Created January 20, 2016 21:01
Convert Contextual Filter to another FORM API Type
/**
* Implements hook_form_alter().
*/
function k2m_profiles_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'views_content_views_panes_content_type_edit_form') {
if (isset($form['arguments']['field_k2m_profile_classification_target_id'])) {
// Grab the taxonomy to make the options win.
$vid = taxonomy_vocabulary_machine_name_load('classification')->vid;
$terms = taxonomy_get_tree($vid);
@labboy0276
labboy0276 / settings.local.php
Last active January 24, 2016 15:05
Drupal 8 Local Settings for using with Pantheon based D8 site
<?php
/**
* @file
* Local development override configuration feature.
*
* To activate this feature, copy and rename it such that its path plus
* filename is 'sites/default/settings.local.php'. Then, go to the bottom of
* 'sites/default/settings.php' and uncomment the commented lines that mention
* 'settings.local.php'.
@labboy0276
labboy0276 / k2m_force_title.info
Last active January 26, 2016 22:06
Force FPP Admin Title, Change as needed
name = Kettering Force Title
description = This module is for forcing the admin title on all FPPs that are reusable.
package = Kettering
core = 7.x
version = 7.x-0.1
dependencies[] = fieldable_panels_panes
@labboy0276
labboy0276 / default.vcl
Last active March 26, 2017 16:09
LEMP Varnish 4 config for Drupal 7 & 8 / Pressflow 6 & 7
/*
* Varnish 4 example config for Drupal 7 & 8 / Pressflow 6 & 7
*/
# Original source: https://github.com/NITEMAN/varnish-bites/varnish4/drupal-base.vcl
# Copyright (c) 2015 Pedro González Serrano and individual contributors.
# MIT License
# Intended to be used both in simple production environments and with
# learning/teaching purposes.
@labboy0276
labboy0276 / php.ini
Created February 8, 2017 18:19
OpCache Settings for PHP 7.x
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
opcache.enable_cli=0
; The OPcache shared memory storage size.
opcache.memory_consumption=128
@labboy0276
labboy0276 / default.vcl
Created March 26, 2017 14:38
LAMP Varnish 4 config for Wordpress
# A heavily customized VCL to support WordPress
# Some items of note:
# Supports https
# Supports admin cookies for wp-admin
# Caches everything
# Support for custom error html page
vcl 4.0;
import directors;
import std;
@labboy0276
labboy0276 / object-cache.php
Created April 8, 2017 19:23
Wordpress Redis Object Cache
<?php
/**
* Plugin Name: Redis Object Cache
* Author: Eric Mann & Erick Hitter
* Version: 1.0
*/
/**
* Adds a value to cache.
*