Embracing the Messiness in Search of Epic Solutions

Author: Shitty Author

  • GCP BigQuery: Finding Expensive Queries

    Problem This post applies to you if: Solution The GCP billing report can tell us the cost breakdown of the services used over time, but it cannot tell us why it costs this much. To get the whys, we need to pull additional data to paint a fuller picture. Filtering the Logs There are several… Read More…

  • Mac: Managing Startup/Shutdown Schedules on macOS Ventura

    PROBLEM Since upgrading to macOS Ventura, managing custom startup/shutdown schedules directly from the GUI (via Energy Saver) is no longer possible. SOLUTION While this feature is not accessible from the GUI anymore, it can still be accomplished using pmset command. To list all the existing schedules: By default, it is empty. To schedule a daily… Read More…

  • WordPress: Creating Gutenberg-Block Compatible Posts Using Rest API

    This article shows how you can dynamically create new WordPress posts using REST API that is compatible with Gutenberg blocks. When done correctly, there is no need to manually convert the content from Classic Editor to Gutenberg Block Editor, or fix incorrectly converted blocks. This is a big time saver when you plan to create… Read More…

  • GitHub: Key is Already in Use

    PROBLEM When trying to add a SSH key in GitHub, an error “Key is already in use” is thrown even though you signed into GitHub using a different user account. SOLUTION The error occurs when the same SSH key has been added to a different account. This typically happens when you already have an existing… Read More…

  • Terraform: Updating State Using “Moved” Block

    This post illustrates how you can rename existing resources or restructure the Terraform codebase without destroying and recreating the resources using moved block introduced in Terraform 1.1. It also explains some limitations using this new construct. PROBLEM: MODIFYING EXISTING RESOURCE NAME Using a simple resource block below as an example… On apply, one resource is… Read More…

  • Wildcard Subdomains in /etc/hosts

    This post illustrates how you use a DNS forwarder to manage wildcard subdomains so that you don’t have to explicitly list each subdomain in /etc/host file. PROBLEM When trying to map multiple subdomains (ex: a.localhost, b.localhost, c.localhost, d.localhost) to the same IP, it is not possible to do the following in /etc/hosts: Rather, each subdomain… Read More…