Embracing the Messiness in Search of Epic Solutions

Tag: MacOS

  • MSAL: Caching Access Token

    Why Cache Access Token with MSAL? Building upon the previous post that performs delegated access authentication with MSAL, suppose your program uses this function to get the access token. In this case, it will always launch the browser to complete the authentication flow and retrieve the access token every time the program runs. While it… Read More…

  • MSAL: Launching Specific Browser with Delegated Access Authentication

    Why Launch a Specific Browser with MSAL? Building upon the previous post that performs delegated access authentication with MSAL, your institution may sometimes allow you to access Microsoft 365 products only on the approved browsers. By default, MSAL launches the default browser on your machine to obtain the access token interactively. If your institution only… 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…

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

  • 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… Read More…

  • 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/id_rsa.pub for public key). If you do not have one, create one: Copy the public key (ex: ~/.ssh/id_rsa.pub) to each remote host’s ~/.ssh/authorized_keys. If this file doesn’t… Read More…