Embracing the Messiness in Search of Epic Solutions

Home

Welcome to my encyclopedia of shitty code!

  • macOS Big Sur: Poor Screen Quality When Connecting to Old Monitor via HDMI

    PROBLEM You have a shiny Mac laptop running macOS Big Sur. This laptop is connected to an old external monitor via HDMI. The screen quality looks pixelated and fuzzy. Running font smoothing (as below) doesn’t fix the problem: You are poor enough to buy a new 4K monitor. SOLUTION The usage of HDMI seems to… Read More…

  • Docker: Executing Startup Script When Running Container Interactively

    PROBLEM When running the Docker container interactively (ex: docker run –rm -it myimage), you want to run a startup script every time. SOLUTION For Ubuntu, Debian and Centos images, write the startup script to /root/.bashrc: For Alpine image, it’s a little different because it uses Ash shell. Besides writing the startup script to /root/.profile, you… Read More…

  • Gone From Our Sight…

    Gone from our sight, but never from our hearts. – Unknown Read More…

  • Git: Querying Tags Without Cloning the Repository

    PROBLEM A typical way to get a list of tags from a repository is to clone it before running git tag:- versionsort.suffix=- ensures 1.0.0-XXXXXX comes after 1.0.0. To retrieve the latest tag:- While it works, it requires us to clone the repository first, and if we want to retrieve tags from multiple repositories, we are… Read More…

  • RPM: Performing Offline Installation

    PROBLEM To perform an offline (or airgapped) installation, sometimes it’s not sufficient to download just the needed RPM package. In most cases, this package requires a list of dependencies to be installed too. For example, Nginx requires at least 20 different packages in order for its installation to be successful:- SOLUTION The first step to… Read More…

  • Nginx: Requesting and Configuring SSL Certificate

    INTRO Step by step instructions for my future self to obtain the SSL certificate and to configure it in Nginx because my fragile little brain cannot retain them at the moment. INSTRUCTIONS Generate a private key and store it in a safe place. Generate a certificate signing request (CSR). Request a SSL certificate from Certificate… Read More…

  • GCP Logging Agent: Converting Unstructured to Structured Logging

    BACKGROUND The GCP logging agent uses modified fluentd, which allows us to do either unstructured logging or structured logging. The structured logging relies on JSON payload while the unstructured logging can be any texts. The advantage of structured logging is we can leverage log features in GCP Log Viewer. UNSTRUCTURED LOGGING Installing the unstructured logging… Read More…

  • GCP Stackdriver Agent: “write_gcm: can not take infinite value” Error

    PROBLEM When running the stackdriver-agent (v6.x), the log file contains the following errors:- SOLUTION By default, the swap metric is enabled. To verify, go to /etc/stackdriver/collectd.conf and locate the following configuration:- This error occurs because the VM instance does not have swap memory, hence this metric plugin tries to divide by 0. To verify the… Read More…

  • Terraform: Handling Errors with try(…)

    PROBLEM Given the following output block:- Sometimes, during an apply or destroy, we may get this error:- One way to fix this is to do conditional expressions like this, but it’s not pretty:- SOLUTION Since Terraform v0.12.20, we can solve this with try and achieve the same outcome:- Read More…

About Author

This author has 20+ years of experience in software engineering and cloud engineering. In an industry where knowledge becomes obsolete in the next three months, he learns anything that crosses his path indiscriminately. He floats from one technology to another like a moth and stings the problem sets like a mosquito. This author codes Java while drinking Espresso and writes Spock specifications while listening to Groovy beats. He masters Google Cloud Platform just like how he masters the art of predicting the movement of dark clouds over his backyard, where 60% of the time, he is right every time.

This author suffers from the Dunning-Kruger effect, where he overestimates his competence and underestimates his ignorance. Technology buzzwords never faze him, for he does not know enough to be afraid of in the first place. GCP, GCS, GCR, GKE, GWT… everything sounds the same to him. He never fears acronyms, synonyms, or antonyms, for he has ChatGPT in his back pocket. This author is a jack of all trades but a master of none. He writes like he knows all the answers, yet he googles for better solutions from elsewhere. He fakes it until he makes it; if he doesn’t, that’s okay because he has the attention span of a squirrel. The blog posts are his buried walnuts, in case he needs them one day.

In conclusion, this author is full of something. He apologizes in advance if you are trying to solve your company’s real problems with his shitty solutions. There, he has successfully written paragraphs of nonsense because every professional blogging website needs a section about the author, with a too-cool-to-smile portrait staring sideways into the abyss.