My Shitty Code

Embracing the Messiness in Search of Epic Solutions

Tag: MacOS

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

  • GCP: Accessing GUI-Based App in GCE from Mac using X11

    PROBLEM You want to access a GUI-based software that is installed in a GCE instance without using NoMachine. SOLUTION GCE Instance (One Time Configuration) Ensure X11Forwarding is enabled and set to yes. If not, change it. If a change is made to this file, restart the service. Mac (One Time Configuration) Apple no longer include […]

  • Ansible: Handling Multiple Hosts via SSH

    PROBLEM To run Ansible playbook in multiple hosts via SSH. SOLUTION Configuring SSH environment Ensure SSH keypair exists on the current machine (ex: ~/.ssh/id_rsa for private key and ~/.ssh/ for public key). If you do not have one, create one: Copy the public key (ex: ~/.ssh/ to each remote host’s ~/.ssh/authorized_keys. If this file doesn’t […]

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

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

    PROBLEM When attempting to launch Eclipse-based app (ex: 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 […]

  • Synology NAS: Running CrashPlan in Docker Container

    BACKGROUND The reason to run CrashPlan in Docker container is to prevent any future Synology’s DSM updates from breaking the CrashPlan app. Let’s assume the Synology NAS IP address is STEPS Diskstation Manager Log into Diskstation Manager: Install Docker. Mac SSH into Synology NAS. Install CrashPlan Docker container. Run CrashPlan Docker container. In […]