Skip to content

Instantly share code, notes, and snippets.

View MerrickClark's full-sized avatar

Merrick Clark MerrickClark

  • United States
View GitHub Profile
@MerrickClark
MerrickClark / terminus-search-replace.sh
Created April 2, 2017 19:02 — forked from wpscholar/terminus-search-replace.sh
WP-CLI Search and Replace via Terminus (on Pantheon)
terminus wp search-replace 'mysite.local' 'dev-mysite.pantheon.io' --site=mysite
@MerrickClark
MerrickClark / CalendarDay.cql
Created January 12, 2016 18:11 — forked from kbastani/CalendarDay.cql
This gist is a Neo4j Cypher query for merging a calendar graph for a specific year. This query has 4 levels of indexes, consisting of year, month, day, hour.
// Enter the day you would like to create
WITH { day: 18, month: 1, year: 2014 } as dayMap
// Merge hours in a day
MERGE (thisDay:Day { day: dayMap.day, month: dayMap.month, year: dayMap.year })
MERGE (firstHour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: 1 })
CREATE (thisDay)-[:FIRST]->(firstHour)
FOREACH (i IN tail(range(1, 24)) |
MERGE (thishour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: i })
MERGE (lasthour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: i - 1 })
'use strict';
const CypherQuery = require('./cypher').CypherQuery;
module.exports = function createQueryExecutor(context) {
const executor = function executeQuery(query) {
if (typeof query === 'function') {
return query(executor);
}
@MerrickClark
MerrickClark / cg-meta-graph.adoc
Created December 29, 2015 17:05 — forked from perival/cg-meta-graph.adoc
A Simple Meta-Data Model for a Graph Database - neo4j

A Simple Meta-Data Model for a Graph Database

Setting up a Meta-Data Framework

This GraphGist is a quick exploration of a simple meta-data administration which can be used to store the structure of the nodes and relationships in a graph database like neo4j.

The data that is set up here could be used in an application layer to provide tailored

language: php
#
# Important to note, this is the version of PHP used to run this build, not the
# one used to run your Drupal installation. Ensure compatibility with the Drush
# and Terminus versions you're using for this build.
#
php:
- 5.3