FormAPI Blog

  • Dynamically Generate Controller Specs for ActiveAdmin

    I use ActiveAdmin (and the arctic_admin theme) to build FormAPI’s internal admin dashboard: ActiveAdmin has a few quirks and bugs, but I enjoy working with it overall. Some other popular admin frameworks for Rails are Administrate and RailsAdmin.

    Read more…
  • How Yak Shaving Helped Me Speed Up GitBook Development by 90 Percent

    I’ve been using GitBook for the FormAPI documentation. It’s been working great in production, but the development server was really slow. The first time you change a file, it restarts pretty quickly, but eventually it would take over 45 seconds to restart and regenerate the files.

    Read more…
  • Proxy Requests to Other Processes During Rails Development

    FormAPI is a Ruby on Rails application, but our blog is powered by Hugo, and we use GitBook for documentation. Rails runs on port 3000 during development, the Hugo server runs on port 1313, and GitBook runs on port 4000.

    Read more…
  • How to Use Ctrl+C to Restart a Process in a Loop

    I start my Rails development processes by using AppleScript to set up iTerm2. I often need to restart my Rails processes when I change something in config/initializers, or if I add a new gem to the Gemfile.

    Read more…
  • Testing One-Line Bash Scripts With Dry Runs

    While working on my Hugo timestamp blog post, I wrote a little script to add a timestamp to my existing blog posts and set the original slug in the YAML:

    Read more…
  • Adding a Timestamp to Hugo Post Filenames

    The FormAPI blog is powered by Hugo, which is an awesome static site generator. It’s written with Go, so it’s incredibly fast. Generating the static pages for our blog only takes 139 ms.

    Read more…
  • How to Include a Screen Recording in a Blog Post (Mac)

    When I was writing my blog post about iTerm2 and AppleScript, I wanted to include a screen recording that showed the script in action. For the last few months, I’ve been using the GIPHY Capture tool for screen recordings.

    Read more…
  • Using AppleScript to set up iTerm2 for Rails Development

    A Rails developer often needs to start multiple processes while working on an application. You might need to run rails server, sidekiq to process background jobs, and webpack to compile your front-end code.

    Read more…
  • Fast Docker Builds for Rails and Webpack

    This blog post demonstrates how to optimize your Docker builds for Rails and webpack. The demo app uses react_on_rails, but most of these techniques can be used with a plain Rails application.

    Read more…
  • Bitcoin Treasure Hunt Answers

    This blog post contains the answers and code for our Bitcoin Treasure Hunt. We gave away 0.0128 BTC by creating a puzzle with 10 questions, including a few programming challenges. If you got all of the answers correct, the result was the private key for this Bitcoin address: 1FormAP1qhonAfJToRfYZG9QtNeMFxsurL

    Read more…