Skip to content

Instantly share code, notes, and snippets.

View stacyhorton's full-sized avatar

Stacy Horton stacyhorton

  • Brisbane, Australia
View GitHub Profile
@stacyhorton
stacyhorton / ERD-Example.puml
Created July 31, 2018 01:33
Some examples of how to use the as-yet undocumented PlantUML ERD functionality.
@startuml
hide circle
hide empty members
' PlantUML ERD examples worked out from:
' https://github.com/plantuml/plantuml/pull/31
together {
' zero or one
foo1 -o| bar1
$enable_elasticache = FALSE;
if ( $enable_elasticache ) {
$conf['cache_inc'] = './sites/all/modules/contrib/memcache/memcache.inc';
$conf['session_inc'] = './sites/all/modules/contrib/memcache/memcache-session.inc';
$conf['cache_backends'][] = './sites/all/modules/contrib/memcache/memcache.inc';
$conf['cache_default_class'] = 'DrupalDatabaseCache';
$conf['cache_class_session'] = 'MemCacheDrupal';
$conf['memcache_persistent'] = TRUE;
$conf['memcache_options'] = array(
Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT,

Keybase proof

I hereby claim:

  • I am stacyhorton on github.
  • I am stacyhorton (https://keybase.io/stacyhorton) on keybase.
  • I have a public key ASBgkCwYwD-8ZSUMt2DZiqYNbHtM4d7qj1NDGA-DCd8jrgo

To claim this, I am signing this object:

@stacyhorton
stacyhorton / prepare-commit-msg
Created April 20, 2014 08:40
A bash Git prepare-commit-msg hook to work with Git Flow and Jira style issue keys
#!/bin/bash +x
#The issue prefix to look for. This must be edited to match your project.
ISSUE_PREFIX=feature/ABC-
#At which line the issue should be inserted. Usually either "1" or "3".
INSERT_AT_LINE=1
#A separator which will be added after the issue is inserted. For readability.
COMMIT_TEXT_SEPARATOR=" "
@stacyhorton
stacyhorton / Request.php
Last active October 11, 2015 20:38
A better way to check class constants in setters from ZF2's Zend\Http\Request
class Request {
const METHOD_OPTIONS = 'OPTIONS';
const METHOD_GET = 'GET';
const METHOD_HEAD = 'HEAD';
const METHOD_POST = 'POST';
const METHOD_PUT = 'PUT';
const METHOD_DELETE = 'DELETE';
const METHOD_TRACE = 'TRACE';
const METHOD_CONNECT = 'CONNECT';