Blog Posts

The Small UX of Users of Gatsby Themes

As authors of themes we can take advantage of starters to make it easier for users of our themes to bootstrap new projects, thus… 

Read more...

gatsby
Introspecting Gatsby Data for URL Redirects

Introspecting Gatsby Data for URL Redirects

I recently needed to switch out the slugger I was using from slugify , which requires a bunch of configuration to get the behavior I want… 

Read more...

gatsby
Listening vs Reading

Listening vs Reading

Last year I had a goal to read 30 books over the year. I hit double digits but didn't make it through all 30. Something else happened last… 

Read more...

Starters and Themes Together

Starters and Themes Together

In the last post in this series, we converted the gatsby-starter-blog repo into a theme. We only made changes that were absolutely… 

Read more...

gatsby
Running a Gatsby Starter as a Theme

Running a Gatsby Starter as a Theme

Gatsby themes introduce a new model for building Gatsby sites and apps. However, due to the recency of themes being available, the majority… 

Read more...

gatsby
Getting Gatsby Images from Generated Fields

Getting Gatsby Images from Generated Fields

Ever since I wrote SEO Images with Unsplash I've been making images for my posts, pulling the branch down to my local computer, adding the… 

Read more...

gatsby
Getting started with Emotion and Gatsby

Getting started with Emotion and Gatsby

Emotion is a library for authoring and composing CSS rulesets in a performant way. Here's how to get started using it with Gatsby . First… 

Read more...

css-in-jsjavascriptgatsbyemotion
Autocompleting Yarn Commands in zsh

Autocompleting Yarn Commands in zsh

Usually I use jq to discover what scripts a node project uses like this: This is fine, and I can always find it be reverse-searching my… 

Read more...

yarnjavascript
Gatsby Plugin MDX Components API Design

Gatsby Plugin MDX Components API Design

Currently there's an issue that can pop up with respect to MDX and compatibility with the wider Remark ecosystem. Remark AST transformations… 

Read more...

javascriptgatsbymdx
Notes on Parsing the GraphQL SDL

Notes on Parsing the GraphQL SDL

Lately I've been doing some work with the GraphQL SDL and graphql-js (because it's for Gatsby and Gatsby is JavaScript). This post is… 

Read more...

javascriptgraphql
Composing Yarn Workspaces

Composing Yarn Workspaces

This week we've been going over multi-package repo tools. Today I want to share a workflow that is enabled by those tools, even across… 

Read more...

javascriptyarn
Multi-Package Repos with Lerna

Multi-Package Repos with Lerna

Lerna is a multi-package repo tool similar to Yarn Workspaces. Many projects choose to use Lerna as the UI for interacting with their multi… 

Read more...

javascript
Multi-Package Repos with Yarn

Multi-Package Repos with Yarn

Yarn workspaces are a great option for working on multiple packages at the same time. They replaces npm link , gives you the ability to… 

Read more...

javascriptyarn
Accessing Props in MDX

Accessing Props in MDX

When writing MDX, sometimes you want to display more dynamic content than you otherwise would be able to. An MDX file that can be templated… 

Read more...

gatsbymdx
SEO Images with Unsplash

SEO Images with Unsplash

I added an SEO component to my blog recently and on top of that I decided to set up infrastructure to pull in images for Twitter, etc. The… 

Read more...

gatsby

Composition of Styles: Strings vs Objects

The most convenient way to write CSS-in-JS styles is with strings. This has multiple benefits such as easier copy/paste from existing code… 

Read more...

css-in-jsemotion

Component Shadowing in Gatsby Child Themes

Today on stream I worked through the final steps for implementing Child Theming for Gatsby. The interesting outcomes of this are that… 

Read more...

gatsby

Building a Basic Gatsby Site

Gatsby is a fantastic tool for building out almost any site you can think of. Due to how flexible it is, some people find themselves… 

Read more...

gatsby

CSS-in-JS Theming on a Component Level

When I wrote Styled System on React Hooks I explored what it might look like in the near future to consume a theme context provided by the… 

Read more...

css-in-jsdesign-systemsemotion

Building Gatsby Plugin Webmentions

I've been idly thinking about how to do comments on my blog since a few people I follow on Twitter have started asking again. Now, to be… 

Read more...

gatsby

Components vs AST manipulation in MDX

MDX presents a new paradigm for people currently using remark (or other markdown rendering approaches). When using remark the most common… 

Read more...

mdxgatsby

How MDX transforms into JSX

MDX is at the core of gatsby-mdx and unified is at the core of MDX... but if you're not immersed in the tech it can be hard to… 

Read more...

mdx

Drawing a Blank

I went to college to play volleyball and studied for an art degree while I was there. I taught myself how to program using actionscript… 

Read more...

art

How and Why: Static Queries in Gatsby Themes

Static Queries are now supported in Gatsby Themes thanks to Dustin . Static Queries are useful in normal Gatsby applications to add… 

Read more...

gatsby

Styled System on React Hooks

I'm pretty confident that the next generation of design-system tools like styled-system will be built on React hooks. So let's take a look… 

Read more...

css-in-jsdesign-systemsemotiongatsbyreact

Controlling the Gatsby Application Root

One of the features I really like about Gatsby is the ability to control the root of the application. In gatsby-ssr.js and gatsby-browser… 

Read more...

gatsby

Contorting Webpack to Render HTML for Gatsby MDX

Here's the code I was just in the middle of writing when I realized I should stop and try to use webpack . First off, what is this code… 

Read more...

gatsbywebpackmdx

Codeblocks, MDX, and mdx-utils

MDX, and gatsby-mdx specifically, is quite often used by people who are building interactive experiences. Some are design system… 

Read more...

gatsbymdx

Towards Shortcodes for Gatsby Sites

Many blogging platforms have the concept of shortcodes. This is especially prevalent in the WordPress community and other places like… 

Read more...

gatsbymdx

Design Systems: People, Processes, and Emergent Behavior

Many people think of Design Systems as a proper noun. This affects the way they map expectations onto terms like "theme", and whether or not… 

Read more...

design-systems

Gatsby Themes, Webpack Loaders, and NPM Packages

Shipping NPM packages is tough, especially for new users. We need to either use build tooling to precompile our code or somehow make the… 

Read more...

gatsby

Removing Gatsby MDX Wrappers

I just removed generated wrappers from gatsby-mdx's implementation. This removed a sticking point for a lot of people from the API… 

Read more...

gatsbymdx

MDX Custom Elements

Disclaimer: This is an advanced topic that bends the internals of MDX to our will. It is not how you should be using MDX for everyday… 

Read more...

mdxgatsbyreact

Gatsby Themes Core Algorithm

Today we're going to talk a bit about the core Gatsby themes algorithm. For background it may be good to read Introducing Gatsby Themes… 

Read more...

gatsbyjavascript

React State With Class Properties

Let's take a look at how to define state inside of React components in order to motivate the usage of class properties. First, the most… 

Read more...

reactjavascript

Listeners Without Renders in React

Sometimes you run into a situation where you want to have some logic that isn't associated with any rendered output but starts/stops when a… 

Read more...

reactjavascript

Chaining Emacs Commands Without Elisp

tldr; here's a video: {{< youtube ok-ktap-gNA >}} Before and After As part of splitting a React component into its own file, Let's take this… 

Read more...

emacsproductivity

Emacs Command Frequency 2017

I use keyfreq to record the commands I use in emacs and periodically check the log to see what I should rebind, etc. here's a list of… 

Read more...

emacsproductivity

Confluent Kafka GKE

In the previous post we went through using StatefulSets to deploy Kafka and Zookeeper on GKE. One problem was that we used an effectively… 

Read more...

gkekuberneteskafkazookeeperconfluent

Kafka, Kube, and Statefulsets on GKE

Kubernetes StatefulSets StatefulSet is the workload API object used to manage stateful applications. StatefulSets are beta in 1.8. k8s docs… 

Read more...

gkekuberneteskafkazookeeper

100 Days of French

Over the last 100 days I've been focused on building new habits. One of those habits is designed to increase my ability to speak French… 

Read more...

french

Formatting Markdown and Codeblocks With Prettier and Hugo

hugo is a fantastic static site generator. prettier is a fantastic auto-formatter with support for markdown and the codeblocks inside… 

Read more...

prettierhugo

React Waypoint Revealable

react-waypoint is a useful tool in the React ecosystem for triggering a function when an element enters or leaves the viewport. waypoint… 

Read more...

reactemotion

Cool Stuff You Can Do With fzf

fzf is an awesome tool for filtering and selecting lists of things on the command line. kill Generalizing kill In addition to the… 

Read more...

cli

Emotion Configurable Imports

tldr: pull request As part of some client work I recently had to port an application from next.js to CRA . Part of this port included… 

Read more...

css-in-jsbabel

Do Expressions and Optional Chaining

Do Expressions and Optional Chaining are two extensions that I am particularly excited about in the ECMA pipeline. update I've removed… 

Read more...

javascriptbabel

Working Faster

When building a startup (or similar new product) it is useful to be able to get as much done as possible. These are some of my current… 

Read more...

toolingstacksgojavascriptgraphql

Emotion Patterns Button Group

CSS-in-JS patterns: Emotion Button Groups How would we build a Button that can be set up as part of a larger ButtonGroup ? Typically in… 

Read more...

emotioncss-in-js

Hard Scheduling

Recently I started completely scheduling out every weekday from waking up to going to bed, which I'm calling "Hard Scheduling". This… 

Read more...

productivity

Work vs Home Equipment

In the ongoing conversation about "work from home" and remote work I've been thinking a lot lately about what professional equipment I have… 

Read more...

React: Communicating With Children

How do custom React Components communicate with their children? A Simple Case Given two components, A and B , where A renders arbitrary… 

Read more...

Servant Custom Content Types

Recently when implementing a Docker Registry I came across the need to hash the incoming request body in a way that matches the clients hash… 

Read more...

Building a Docker Registry

Containers are surging right now. This series of blog posts will explore a small corner of that universe by building a Docker Registry that… 

Read more...

Response Headers with Servant

It can be hard to figure out how to deal with all of the type machinery in Servant. This post details adding headers to the response of a… 

Read more...

Instrumenting Servant with Prometheus

To set up a Servant/WAI application with monitoring, we will first scaffold a servant application using stack. To instrument our servant… 

Read more...

Reproducible Tutorials with Stack

Stack yields some nice benefits for blogging, tutorials, and more. The main benefit I want to talk about today is reproducibility when using… 

Read more...

Episode 1: A New Blog

Hooray! A new published version of my blog (which also happens to include everything on this domain and thus is not just a blog). A New Blog… 

Read more...

Deploying a Minecraft Server with Docker Machine

The previous post explains how to get up and running with Docker machine. This one will be a quick tutorial on setting up a Minecraft… 

Read more...

Docker Machine

In this post, I will record the process through which I attempt to use Docker Machine to deploy a simple Haskell application on Digital… 

Read more...

Using the Docker-Haskell Official Image

Prerequisites: an install of Docker (If you don’t want an install, Digital Ocean also has a Docker Droplet). The Docker-Haskell “Official… 

Read more...

Emacs in Docker

Assuming a docker installation (either boot2docker or just docker) and a version of 1.3 or higher, we can use Volumes to enable a portable… 

Read more...

Deploying Snap with Docker

Previous Post – Working With Snap 1.0 In our previous post we built out a scaffold project with Snap 1.0. In this post we’ll go over… 

Read more...

Working with Snap 1.0

Snap 1.0 isn’t on Hackage yet, but here’s how you can play with it now. NOTE: This was written using ghc-7.8.3. The repo is on GitHub First… 

Read more...

A Foray Into Haxl: PostgreSQL Simple

I wrote a simple Haxl DataSource and I thought it would be good to share. If you don’t know what Haxl is you can find out more here . The… 

Read more...

STM-Containers Benchmarks

Benchmarks available on GitHub and as Github pages . Tests were run with ghc 7.8.2 and a 12 core Mac Pro (Trashcan). Here’s a fun… 

Read more...

Getting Started with PureScript

According to PureScript.org PureScript is a small strongly, statically typed programming language with expressive types, written in and… 

Read more...

Handling Taps on List/Grid Items with ViewPagers (GestureDetector)

When placing a ViewPager inside of a GridView recently I ran into the issue of the ViewPager stealing the GridView Items’ click event. I had… 

Read more...

Snap, Postgres and Heist: Displaying Data from Queries

The github repo for this post is here . Single AuthUser Splice Assuming we have instances and initializations for the Postgres Auth backend… 

Read more...

Getting Started with Robolectric: Headless Android Testing with Vagrant

In this post we will go over how to set up the sample project for Robolectric, run, test and deploy to a device in a headless vagrant… 

Read more...

GHC -ddump-minimal-imports and CPP error: missing binary operator before token "("

Today I was trying to extract the minimal imports for a module using ghc -ddump-minimal-imports but I was getting this error on some files… 

Read more...

Riak, HAProxy and Haskell: MultiMachine Vagrant on OSX

In this post we will go over how to set up five Riak nodes, cluster them, setup HAProxy on a sixth machine and run a Haskell environment in… 

Read more...

GeoSpatial Indexing with Riak Search 2.0 (Yokozuna/Solr)

In this post we will be using curl to construct a geospatial index using Riak Search 2 (also known as Yokozuna) which is backed by Solr. I… 

Read more...

Environment Variables in Haskell

In this post we will go over how to accept environmental variables in Haskell. We can compile this if we put it in a file called env.hs… 

Read more...

Writing A First Emacs Elisp Function

So today I tried to write my first fully custom Emacs Lisp code. Here are some things I learned (along with the code for a region-to-gist… 

Read more...

Deploy Haskell's Snap on Heroku

In this post we will deploy our Snap app to Heroku. part 1 part 2 part 3 First, we need to put a Procfile in the root of our project… 

Read more...

In Search of a Riak Solr Client for Haskell

In this post are the beginnings of riak-solr-client. First, we need to take a look at the response from Solr/Yokozuna/Riak-Search-2 for a… 

Read more...

Android ListFragment Populated by RoboSpice

In this post we are going to add a ListFragment backed by the RoboSpice data from the first post The git repo is here . Firstly, we are… 

Read more...

Android RoboSpice with GoogleHttpClient

In this post we will examine an example app in which we make a RoboSpice request using GoogleHttpClient. The github repo is here… 

Read more...

MOCL for Android Part 2: Drakma

In this post we will enable Drakma HTTP support in the Android/MOCL example code. I have forked the repo on Github for posterity. The… 

Read more...

Scaffolding a Clojure/Compojure Webapp for Heroku

In this post we’ll go through the process to create a basic Clojure/Compojure/libnoir scaffolding project and deploying it to Heroku. First… 

Read more...

Getting Started With Snap (and User Authentication): Part 3

In this post we will be replacing the JSON file (for user authentication) with a Postgres database. Git Diff and Repo part 1 part 2 In… 

Read more...

Common Lisp on Android: Running the MOCL Android Example

Prereqs: Install ADK, Android NDK, and mocl. git clone the sample app somewhere: Import the cloned app into Android Development’s version of… 

Read more...

Getting Started With Snap (and User Authentication): Part 2

Git Repo part 1 The file structure now looks like this: abc.cabal includes our dependencies and build information. This file is read when… 

Read more...

Using Databases inside of Snaplet Auth Restricted Routes

The github repo for this code is at here . tldr; use this instance: The app we’re using was built by running snap init and adding the… 

Read more...

Books on My Bookshelf for 2014

I decided to take stock of the books that are sitting on my bookshelf for 2014. Here is that list. Starting with some (of my) classics… 

Read more...

Getting Started With Snap (and User Authentication): Part 1

Part 2 Before we get started, there is a quickstart on the snap-framework site here that goes into the barebones scaffold project a bit… 

Read more...

Flattening Nested Arrays in JavaScript

I was writing a quick script today and came across a nice use case for .apply to merge nested arrays into a single array. So I figured I’d… 

Read more...

Installing Montage: A Riak sibling resolution library written in Haskell, on OSX

Here is a description of how I installed Montage ( https://github.com/bumptech/montage ) with GHC 7.6.1 First clone these repos (the… 

Read more...

Vagrant Can Not SSH Into the Box

For Vagrant, if you see this error after vagrant up -ing the box. 

Read more...

Installing Yokozuna on OSX Lion with Homebrew

It’s important to have Ivy installed before make yz-setup or the priv/solr.jar won’t be built. The build script only checks for the… 

Read more...

Clojure Compojure Jetty Integration

If you want to deploy a Clojure/Compojure application you’re going to need a couple hints. First, in project.clj you’re going to need to add… 

Read more...

Quick Tip: Haskell List Comprehensions

I think list comprehensions are my favorite reason to pull out Haskell. For example: I was recently asked this: You have a row of 10… 

Read more...

Quick Tip: JavaScript Partially Applied Functions

Say we have the following function: We can use this function to create new, higher order functions that increase a number by a certain value… 

Read more...

Consistant Hash Routing in Riak Core

Prerequisites The Code The first function, shown above, pings a random (random enough for our purposes) vnode and returns the partition… 

Read more...

Riak Core: myapp:ping().

As seen in the quickstart post ; the default Riak Core template gives you a myapp:ping(). method. I named my application spades, so my… 

Read more...

Riak Core: Quickstart

First Retrieve the Rebar Templates and put them in ~/.rebar/templates You’ll also need Rebar and Erlang . I used homebrew to get them… 

Read more...

Riak Core: Up and Running

Some of the current Riak Core resources available are: try try try: A blog written by Ryan Zezeski. It includes a few posts on Riak Core… 

Read more...

Riak Core: Unique Identifiers

To generate a unique identifier, Riak Core exposes: Which returns a string that looks like this: The full function can be seen below: 

Read more...

A Python Flask CRUD

Recently I was asked to build a CRUD app. The task was open to using any tech I wanted on the backend, so my first thought was a distributed… 

Read more...