Skip to content

Instantly share code, notes, and snippets.

@laugues
laugues / elasticsearch.sh
Created April 16, 2020 14:34
Install elasticsearch tools
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.6.2
@laugues
laugues / access_postgresql_with_docker.md
Created May 7, 2019 17:37 — forked from MauricioMoraes/access_postgresql_with_docker.md
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

@laugues
laugues / vue.config.js
Created December 28, 2018 14:14
Vue js config for loading external css without impact code
module.exports = {
baseUrl: process.env.NODE_ENV === 'production' ? '../../../../script/gantt' : './',
configureWebpack: {
output: {
libraryExport: 'default'
}
},
css: {
loaderOptions: {
// pass options to sass-loader
@laugues
laugues / Level.java
Created November 3, 2018 08:40
Simple enum with lookup on it's own porperties
import java.util.HashMap;
import java.util.Map;
/**
* Level type
*/
public enum Level
{
/**