Skip to content

Instantly share code, notes, and snippets.

Last active November 2, 2019 21:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save xmlking/98e200fc29c54b7a6cc776218e263260 to your computer and use it in GitHub Desktop.

mac tips

  • Grep three lines....

    # highlight `app:`
    kustomize build $BASE | grep -C 3 app:
    # Compare the output directly to see how staging and production differ:
    diff \
      <(kustomize build $OVERLAYS/staging) \
      <(kustomize build $OVERLAYS/production) |\
  • how to add multiple localhosts to mac, sothat I can run multiple services on same port?

    Add alias IPs for lo0

    sudo ifconfig lo0 alias
    sudo ifconfig lo0 alias

    Add hostnames for each of those IPs in /etc/hosts

    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    ##       localhost broadcasthost
    ::1             localhost
    # Added by Sumanth accountsrv emailersrv greetersrv
    # End of section
    # Added by Docker Desktop
    # To allow the same kube context to work on the host and the container: kubernetes.docker.internal
    # End of section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment