Skip to content

Instantly share code, notes, and snippets.

emilio2hd / app.component.ts
Last active Jul 27, 2019
Print message array every 5000 ms or if the buffer reach 5 items
View app.component.ts
export class AppComponent implements OnInit {
messageBuffer$ = new Subject<string>();
msgCount = 0;
ngOnInit(): void {
bufferTime(5000, null, 5),
filter(buffer => buffer.length > 0),
emilio2hd /
Last active Oct 15, 2018
Docker + Elasticsearch + Logstash + Kibana

Configuring Elasticsearch + Logstash + Kibana using Docker

Here, there are some configs to use Elasticsearch as a Docker container and Logstash + Kibana as well.

You will see that Elasticsearch config is separated from Logstash and Kibana because I'm assuming that you want to use the ES container to other things rather than only log analyses.

Docker instalation

Go to and open the "Docker CE" menu, choose you OS and follow their instructions.

After install, open your terminal and type:

View docker-pocket.txt
# Build an image
docker build -t <image_name> <dockerfile_path>
# Run a container
docker run -d -p <host_port>:<container_port> --name <container_name> <image_name>
PS1: In this sample, I'm mapping ports with option '-p'. For more details, see below.
PS2: You can add links among containers using --link <container_name>:<alias> option.
# Start a bash session at a running container
docker exec -it <nome_container> bash
emilio2hd / gradle_defaults_main.yml
Last active Apr 6, 2020
Ansible role to install sdkman and gradle
View gradle_defaults_main.yml
sdkman_folder: '/home/vagrant/.sdkman'
gradle_version: 2.3