latest posts

  • How to Write Custom Rubocop Linters for Database Migrations

    Active Record and Sequel migrations provide an easy way for Ruby developers to alter their database schemas without having to write SQL by hand. This abstraction means that the same migration file could work against both a Postgres and MySQL database by simply changing the underlying database adapter. For large projects with many developers, however, it can be difficult to keep migration style consistent and enforce best practices without additional tooling. In this post we'll write our own custom Rubocop cop for linting migration files.

    December 09, 2017
  • Securing Rails Secrets with Cloud Foundry CredHub

    Over the years, secret management in Rails has greatly improved. Gone are the days of the version-controlled secret_token.rb and now providing secrets through environment variables is encouraged. Environment variables can come with their own problems, however. Luckily with Cloud Foundry and CredHub, there's another way.

    October 11, 2017
  • How to Add a Custom 404 Error Page to a Cloud Foundry Staticfile Buildpack Site

    Although Cloud Foundry makes it simple to get your static site up and running on the web, getting rid of the default NGINX 404 page can be a bit tricky. This post will walk you through tweaking the Staticfile buildpack's NGINX config to serve custom error pages.

    September 22, 2017
  • How to Deploy a Static Website with Cloud Foundry

    When it comes to hosting a static website there are many options available ranging from the free (and somewhat limiting) Github Pagesto deploying directly to an Amazon S3 bucket to self-hosting NGINX on Digital Ocean. For those looking for more flexibility than what Github and S3 can provide, but want to avoid the hassle of maintaining a full virtual machine on Digital Ocean, a managed Cloud Foundry can be a good option. This post will cover how to use the Cloud Foundry Staticfile buildpack to deploy to a public Cloud Foundry PaaS and wire it up with a custom domain name and Cloudflare SSL.

    September 17, 2017
  • Migrating from Jekyll to Hugo to Ghost to Jekyll

    In a world where new static site generators and blogging platforms crop up everyday it can be tempting to scrap everything and start anew. This is the story of me doing just that -- moving from Jekyll to Hugo to Ghost and winding right back up at Jekyll. A rambling tale of what I discovered and why I didn't end up migrating in the end.

    May 20, 2017