My Shitty Code

Embracing the Messiness in Search of Epic Solutions

Category: Operating System

  • 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 […]

  • Chromebook: Using Logitech Unifying Receiver

    PROBLEM If you have a decent Logitech keyboard/mouse, chances are you might also have a Logitech Unifying Receiver, which is a small USB dongle that allows multiple Logitech devices to be connected to a single computer. This is useful if your institution disables the Bluetooth connectivity on the institution-managed Chromebook. However, if your institution also […]

  • 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 […]

  • 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 […]

  • macOS + Eclipse: The ‘X’ Executable Launcher was Unable to Locate its Companion Shared Library

    PROBLEM When attempting to launch Eclipse-based app (ex: MyApp.app) on Mac, the following error is thrown:- SOLUTION This problem seems to occur on macOS Sierra and later. When unzipping the app, the lingering extended attributes prevent the app from launching. To fix this, run the following command to remove these extended attributes:- Then, double click […]

  • tar: Exiting with failure status due to previous errors

    PROBLEM When creating a compressed archive file:- … the following error is thrown:- SOLUTION This error usually occurs due to permission issues. However, the error messages are hidden beneath gobs of output activated by the verbose flag. To fix this, reduce the output by removing the -v flag:- … and now, the error message appears:- […]