Mike Coutermarsh
  • Home
  • About
  • Twitter
  • GitHub
Sign in Subscribe
PlanetScale

Identifying slow Rails queries with sqlcommenter

View this post on PlanetScale.
Jun 29, 2022

The anxiety of tech debt

No perfect code or system exists. Ask any engineer and they’ll have a list of improvements for most any file they’ve ever touched. This list of negatives can weigh on people. “We need to fix it eventually” or bad things will happen. Like any source of anxiety, the
Mar 19, 2022 1 min read
PlanetScale

How we made PlanetScale's background jobs self-healing

View this post on PlanetScale.
Feb 17, 2022

Using GitHub Package Registry with Netlify

This took me too long to figure out. I hope it helps you. Here’s the best way I’ve found to get GitHub Packages working with a Netlify build. 1. Add this file to your repo. I put it at .npmrc-netlify in the root of the project. This keeps
Feb 1, 2022

You should be using a clipboard manager

If you don’t have one already, install one and start using it. * Set a LONG history (mine is 3 months). * Now every code snippet you ever copy is in an easily searchable database so you can pull it back up whenever you need it. I personally use Paste and
Jan 27, 2022
PlanetScale

Using entropy for user-friendly strong passwords

View this post on PlanetScale.
Jan 24, 2022

I still use vim

You probably saw this video and are wondering: “After all this time, do you still use vim?”. Yes, I do. And I still love it. My setup also hasn’t changed that much. I still use Vim + iTerm2 for almost all of my work. My dotfiles are still public if
Jan 23, 2022
PlanetScale

How our Rails test suite runs in 1 minute on Buildkite

View this post on PlanetScale.
Jan 18, 2022

Why infrastructure engineers prefer MySQL

For years I’ve been noticing this pattern of infrastructure engineers I really respect preferring MySQL and product engineers preferring Postgres. It took quite a while for me to understand it. Especially coming from my background as a product engineer. Different types of engineers value different things Infrastructure engineers generally
Jan 16, 2022 1 min read

Why not use the most "hype" stack?

Got a great question in Twitter DMs. How do you stay motivated on working with boring/non-hype tech? I’m always hyped about a new stack and can’t make progress building a SAAS. It’s hard out there. If you read twitter, hacker news, etc, there is always something
Jan 14, 2022 3 min read

When to cache in your Rails app

I’ve been working on Rails applications for over 10 years. In that time I’ve figured out some guidelines on when and when not to use caching. Years ago, I’d cache almost everything. When joining GitHub, I remember being shocked by how little caching was actually used for
Jan 9, 2022 3 min read

Running queries in parallel with Rails 7 and load_async

Rails 7 has added the load_async method to ActiveRecord. This looks like it could be a huge performance win for many Rails applications. Normally, a Rails app will execute all of its queries serially (one after another). The execution of the request waits while the query is executed. With
Jan 8, 2022 2 min read

CORS Tester

I wrote a little CORS tester tool to make testing urls for CORS easier. Mostly I was interested in experimenting with Cloudflare workers more. The entire site is deployed as a Cloudflare worker and served by a single js file. It worked real nicely for a small site. For a
Dec 27, 2020 1 min read

How we use "ship small" to rapidly build new features at GitHub

View this post on Dev.to.
Feb 1, 2020

GitHub Actions - Deploy to Heroku

Here’s how to deploy to Heroku using GitHub Actions. Without adding any new dependencies. First, you need a Heroku auth token. You can generate one on your machine using the following: heroku authorizations:create Copy the Token value and add it as a secret to your repository (Go to
Nov 2, 2019 1 min read

Heroku + Ruby + GitHub Package Registry

If you’re using Gems published to GitHub Package Registry. source "https://rubygems.pkg.github.com/mscoutermarsh" do gem "omniauth-auth0", "2.1.0" end You need credentials to install them. An easy trick for doing this is using bundler’s built in environment variable support. Add the following config var
Oct 26, 2019

Creating images with Ruby + HTML/CSS API

View this post on Dev.to.
Mar 10, 2019

CloudFlare + Azure Functions Custom Domain Setup

How to do it In CloudFlare, setup your DNS entry to look like this: The key part is, leaving the “cloud” set to DNS only (only for setup, you can enable CDN after setup). Once you do that, click “Validate” in Azure and you’ll get that “Domain Ownership” box
Jan 20, 2019

Serverless + Cloudflare Workers + NPM Modules

Here is how I got NPM modules working with Cloudflare workers + Serverless. 1. Install webpack npm install --save-dev webpack 1. Add a webpack config. webpack.config.js module.exports = { target: 'webworker' }; 1. Add build to your package.json "build": "webpack yourFunctionFile.js", 1. Update your serverless.yml. functions: helloWorld: worker:
Oct 21, 2018

Highlight.js with Webpacker and Rails

Key is: use the hightlightjs shim. Install it using yarn. yarn add highlightjs Inside one of your packs (or application.js), add: import hljs from 'highlightjs' hljs.initHighlightingOnLoad();
Apr 14, 2018

Quick tip for sending better Slack DMs

Quickly improve the effectiveness of your communication via Slack by making your messages actionable. Bad Hey, can you do me a favor? Better Hey, can you do me a favor? This user account is locked out. Best Hey, can you do me a favor? This user account is locked out
Oct 30, 2017

AWS Policy - Full S3 Access for a Single Bucket

I’ve found myself googling this every couple months. So I’m posting an example here to save you and myself in the future. If you’re creating an API user with full access to only a SINGLE S3 bucket, this example policy will work for you. If you want
Sep 25, 2017

Storing Emails in Postgres + Rails - Use Citext

Text fields in Postgres are case sensitive. This is a problem when storing emails because coutermarsh.mike@gmail.com and Coutermarsh.Mike@Gmail.com are not equal. If you do any lookups by email address, you have a few options. 1. always use downcase on write 2. use a functional
Aug 29, 2017 2 min read

Selecting a value from JSONB - Postgres

Quick postgres tip. If you have a JSONB column named “options” and it has a key “favorite_color”. Here is an example on how you select the value from it: SELECT options->'favorite_color' FROM table_name; Filter by a jsonb value: SELECT COUNT(*) FROM table_name WHERE (options @> '{
Aug 7, 2017

Mistakes implementing avatars

In the past 3 years, we’ve gone through several iterations of how we host avatars on Product Hunt. There were a lot of mistakes. This is what I recommend doing if you’re adding avatars to your web app. Short version: 1. Upload the original image directly to S3.
Jul 30, 2017 1 min read
← Newer Posts Page 2 of 5 Older Posts →
Mike Coutermarsh © 2023
  • HTML/CSS to Image API
  • Twitter
  • GitHub
  • LinkedIn