2019 East Coast Drupal Camp Guide

drupal, camps

East Coast Drupal's guide to camps.

Event Start Date End Date CFP Deadline Locale
Drupal Camp New Jersey 02/02/2019 02/02/2019 Closed Princeton, NJ
Florida Drupal Camp 02/15/2019 02/17/2019 Closed Orlando, FL
Drupal Con 04/08/2019 04/12/2019 Closed Seattle, WA
Drupaldelphia 05/10/2019 05/10/2019 03/08/2019 Philadelphia, PA
Drupal Camp Chattanooga 06/08/2019 06/08/2019 N/A Chattanooga, TN
Drupal Camp Asheville 07/12/2019 07/14/2019 04/22/2019 Asheville, NC
Drupal Gov Con 07/24/2019 07/26/2019 N/A Washington, D.C.
Decoupled Drupal Days ~Aug * ~Aug * N/A NYC, NY
Drupal Camp Baltimore ~Oct * ~Oct * N/A Baltimore, MD
Drupal Camp Cornell ~Oct * ~Oct * N/A Ithaca, NY
Drupal Camp Atlanta ~Nov * ~Nov * N/A Atlanta, GA
New England Drupal Camp ~Nov * ~Nov * N/A Providence, RI

* Dates are based on camp dates from 2018.

If I missed one, or you feel like the dates are incorrect please reach on twitter at @aczietlow and I'll be happy to update them ASAP.

Find mysql Table Size

mysql, code snippet


A sql query to list the size of database tables on a mysql server.

SELECT concat( table_schema, '.', table_name ) table_name,
       concat( round( data_length / ( 1024 *1024 ) , 2 ) , 'M' ) data_length,
       concat( round( index_length / ( 1024 *1024 ) , 2 ) , 'M' ) index_length,
       concat( round( round( data_length + index_length ) / ( 1024 *1024 ) , 2 ) , 'M' ) total_size
FROM information_schema.TABLES
ORDER BY LENGTH(total_size) DESC, total_size DESC


I found myself working on a project that had been in active development for 5 years and had a 25 GB database. One of my tasks was to implement automated testing and build a CD/CI pipeline in an effort to decrease the amount of bugs we were shipping and decrease the feedback loop on newly implemented features. The largest challenge was the amount of time it took to build a fresh instance of the site. This was almost entirely due to the size of the database.

Typically I would look at deleting all content to drastically trim the size of the database, as it's not needed for testing. However, a very complex data architecture made it difficult to separate content from configuration. Using the above query, I was able to identify which tables were the largest, and quickly focus on efficiently trimming the size of the database down. e.g. We had implemented duplicate logging paradigms without a method to truncate data over time. This accounted for about 6 GB by itself.

I also use the results to identify if any of our indexes could be refactored to be more efficient. An index size that closely matches the table_data size could indicate redundant or duplicate index entries.

How it works

It queries the information schema table to get the size of the database on disk. Initially I found that the data_length was significantly different from the size on disk, which led to the combination of data_length and index_length. Using some simple math I convert the bytes into MB to make the output more human readable. Finally I sort using a natural number sort, similar to php's nat_sort of alpha-numeric values.

WTF is Sculpin

wtf is, sculpin
Meet Jackson, the Sculpin mascot

Sculpin is a static site generator written in PHP. And WTF is a static site generator? It's a tool for generating html files using raw data like TWIG and markdown. It's great for a website that has content that doesn’t need to be updated by multiple users on a regular basis, authentication, search, or any logic that requires server side communications. It can remove much of the complexity that comes with a CMS or hefty framework, as well as the need for server side technologies like PHP or a database server. A Static site generator is great for my personal blog or the local astronomy group news site, but not ideal for a large news organization that has much more dynamic content. Sculpin has the advantage of being written in a language I’m already familiar with; PHP. Some of the standout features of Sculpin include:

  • Writing content in markdown
  • TWIG templating
  • Syntax highlighting
  • Extremely fast
  • Secure (everything is client side)
  • Easily deployable (Can host static sites from github for free)

Sculpin is perfect for creating a blog with a minimum amount of resistance for sharing code snippets and jotting down a few of opinions to share with the Interwebs from time to time. It's Especially useful for anyone already familiar with PHP and writing markdown.

How does one Sculpin?

Installing Sculpin

  1. Download the starter kit
git clone https://github.com/sculpin/sculpin-blog-skeleton.git myblog
cd myblog
composer install

The starter kit is a skeleton build of Sculpin and is a great starting point for launching Sculpin as a blog.

  1. Run Sculpin
vendor/sculpin/sculpin/bin/sculpin generate --watch --server

Navigate to http://localhost:8000. BAM! You now have a boiler plate Sculpin site.

What's Happening?

Magic! Okay maybe not magic. Sculpin comes with an executable bin, that we're running to parse all of the source objects (Twig templates, html, and markdown) files it can find to generate static html pages.

--watch tells Sculpin to watch for file changes in order to rewrite necessary HTML files. --server launches PHP's built in web server which allows you to see your work in progress. The fact that a working web server like apache isn't required makes it even easier to skip straight to writing content without any needless complicated setup.

Creating Content in Sculpin

Sculpin uses a markdown converter michelf/php-markdown for taking the blog content written in markdown and converting it to html. That means once the Twig templates and theme are in place, adding new content can be as simple as dropping a new markdown file into the code base. Luckily the starter kit comes with a working layout and theme, so we can get jump start to creating content.

By default Sculpin will look for blog post content or source objects in each file under the `/source' directory. All content posts can be written in markdown which Sculpin with convert into html.

 # Markdown Cheatsheet

 # This is an <h1>
 ## This is an <h2>
 ### This is an <h3>

 We can place special emphasis on some words by making them **bold** or *italics*

  [More on Markdown](https://guides.github.com/features/mastering-markdown/)

 1. Step 1
 1. ????
 1. Step 3: Profit

 * Moon Knight
 * Scarlet Witch
 * Gambit
 * Hope Summers

This is an <h1>

This is an <h2>

This is an <h3>

We can place special emphasis on some words by making them bold or italics

Link More on Markdown


  1. Step 1: Make numbered list
  2. Step 2: ????
  3. Step 3: Profit
  • Moon Knight
  • Scarlet Which
  • Gambit
  • Hope Summers

Syntax Highlighting

Another key feature that is a necessity when writing about code is syntax highlighting. Sculpin ships with highlightjs. No assembly required, batteries included!

use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;

$autoloader = require_once 'autoload.php';

$kernel = new DrupalKernel('prod', $autoloader);

$request = Request::createFromGlobals();
$response = $kernel->handle($request);

$kernel->terminate($request, $response);
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;

$autoloader = require_once 'autoload.php';

$kernel = new DrupalKernel('prod', $autoloader);

$request = Request::createFromGlobals();
$response = $kernel->handle($request);

$kernel->terminate($request, $response);


Sculpin's theming system can be heavily customized, but for the most part does a great job of getting out of your way. It uses TWIG for it's templating engine, and relies on creating layouts, which are mostly just wrappers around page content.

# source/_layouts/default.html
<!DOCTYPE html>
    {% include "head" %}
<body id="body">
    <div class="page-content">
        {% include "header" %}
        <main class="content" role="main">
            <div class="row">
                <div class="col-md-6 col-md-offset-2">
                    {% block content_wrapper %}{% block content %}{% endblock %}{% endblock %}
                <div class="col-md-2">
                    {% include "side_bar" %}
        {% include "footer" %}
    {% include "scripts" %}

But that's a blog for another time.

YAML Formatter

Sculpin provides a method to add additional information about conten via a YAML formatter. YAML formatters are are a great way to provide meta information about the blog with in the markdown file. Information that can be used to do things like generate markup for something not easily supported in markdown, provide meta tag information, create taxonomy tagging of content, and more.

Markdown without YAML formatter.

 # Normal Markdown

With YAML formatter

title: WTF is Sculpin
date: 2017-03-31
layout: default
    - wtf is
    - sculpin
    image: jackson.png
 # Markdown with spandex and a cape

The YAML formatters are seperated by --- and written in YAML syntax. The YAML formatter will be parsed and injected into every page twig template using page.%KEY%. Nested structures are accessible by using a . to decend through the structure.

we can access YAML directives with the TWIG template view WTF is Sculpin

<img src="jackson.png"/>


Sculpin does exactly what it sets out to do, and does it well. It's a great tool for someone already familiar with PHP, looking for a way to quickly take TWIG templates, html, and markdown to create a static site that is easily deployable. While it can be extended by creating new bundles, it does not offer a lot in terms of managing dynamic content that requires server side interactions. It is a tool for a specific task, a task that it handles extremely well.

A huge thanks to Beau D. Simensen who created Sculpin, and being an all around awesome human being.