Skip to content

Instantly share code, notes, and snippets.

@chaines27
chaines27 / homebrew-openjdk-configuration
Last active June 14, 2022 08:29
Configuration for homebrew-openjdk for macOS to see it as an installed JVM
OpenJDK 1.8
1. Follow the instructions from https://github.com/AdoptOpenJDK/homebrew-openjdk to tap and install jdk8.
2. Run the following command to create the necessary directories
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk/Contents
sudo mkdir /Library/Java/JavaVirtualMachines/openjdk-1.8.0_172.jdk/Contents/MacOS
3. Run the following commands to link to the existing homebrew-openjdk install
@MauricioMoraes
MauricioMoraes / access_postgresql_with_docker.md
Last active May 2, 2024 10:21
Allow Docker Container Access to Host's Postgres Database on linux (ubuntu)

You have to do 2 things in order to allow your container to access your host's postgresql database

  1. Make your postgresql listen to an external ip address
  2. Let this client ip (your docker container) access your postgresql database with a given user

Obs: By "Host" here I mean "the server where docker is running on".

Make your postgresql listen to an external ip address

Find your postgresql.conf (in case you don't know where it is)

$ sudo find / -type f -name postgresql.conf