HomeBlogSnippetsPodcasts
Schedule Call

Code Snippets

These are a collection of code snippets I've used in the past and saved. Some are for Rails, some marketing related, and all include setup instructions.

Postgres VACUUM FULL without a lock

Postgres VACUUM FULL without a lock

How to simulate a VACUUM FULL on your Postgres database without locking it down.

Learned from jsoyland

Migrating Cloudinary Accounts

Migrating Cloudinary Accounts

A handy Ruby script if you ever have to migrate buckets for Cloudinary.

Learned from cloudinary

Rendering Contentful in Rails and Next.js

Rendering Contentful in Rails and Next.js

A couple of code snippets to help you render your Contentful content in Rails or Next.js.

Device Detection with Devise

Device Detection with Devise

A friendly guide to implementing device detection with Devise

Recover Single Table From Large Postgres Database

Recover Single Table From Large Postgres Database

Do you run a large Postgres database and don't have the time to recover every single table? Then you may have found a quick solution.

Two-way database syncing in Rails 6.1

Two-way database syncing in Rails 6.1

Example concern for syncing one DB to another with production traffic.

Learned from kwuchu

Postgres autovacuum scale factor

Postgres autovacuum scale factor

Few notes on keep Postgres autovacuum behaving nicely as you grow.

Learned from jsoyland

Splitting Webpacker Alphabetically

Splitting Webpacker Alphabetically

A very, very odd way of splitting up your vendor libraries that worked for me.


Living in

Fukuoka, Japan

HomeDashboard
TwitterInstagramGitHubYouTube
UsesSnippets