Skip to content

Instantly share code, notes, and snippets.

View isweluiz's full-sized avatar

Luiz isweluiz

View GitHub Profile
@isweluiz
isweluiz / git.md
Created June 7, 2018 17:14 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

Best UNIX Shell tools
These are a list of usages of shell commands I can't live without on UNIX-based systems.
Install
Mac OS X
Using Homebrew (yes, I am opinionated) you can install the following tools with the following packages:
brew install proctools # to install pgrep, pkill, etc.
brew install pstree # to be able to use pstree
brew install vnstat # to be able to use vnstat
@isweluiz
isweluiz / gist:8a9914d129ea3d87f0f4a39b2bec5fa6
Created October 9, 2019 22:30 — forked from jhmartin/gist:c09e450853e273ee88f2
Multiple Elasticsearch outputs in logstash
#http://pastebin.com/xGt6vv9R from yardenbar
output {
if [type] == "postfix" {
elasticsearch {
host => [ "ES_HOSTNAME" ]
protocol => "transport"
cluster => "elasticsearch"
index => "postfix-%{+YYYY.MM.dd}"
manage_template => true
template_overwrite => true
@isweluiz
isweluiz / curator_cluster_config.yml
Created October 22, 2019 15:34
Configuration Curator - cluster SSL
---
client:
hosts:
- "es_coordinating_01.singhaiuklimited.com"
port: 9200
url_prefix:
use_ssl: True
# The certificate file is the CA certificate used to sign all ES node certificates.
# Use same CA certificate to generate and sign the certificate running curator (specified in properties client_cert and client_key)
certificate: '/work/elk/elasticsearch-6.3.2/config/x-pack/certificate-bundle/ca/ca.crt'

Amazon Elastic File System (Amazon EFS)

EFS

Scalable, elastic, cloud-native NFS file system

EFS

Abstract

Launch instance templates + tomcat 9

You can create a launch template that contains the configuration information to launch an instance. Launch templates enable you to store launch parameters so that you do not have to specify them every time you launch an instance. For example, a launch template can contain the AMI ID, instance type, and network settings that you typically use to launch instances. When you launch an instance using the Amazon EC2 console, an AWS SDK, or a command line tool, you can specify the launch template to use.

The following diagram shows a launch template with three versions.

official

AWS Application Load Balancer

Elastic Load Balancing automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones. It monitors the health of its registered targets, and routes traffic only to the healthy targets. Elastic Load Balancing scales your load balancer as your incoming traffic changes over time. It can automatically scale to the vast majority of workloads.

Elastic Load Balancing supports the following load balancers: Application Load Balancers, Network Load Balancers, Gateway Load Balancers, and Classic Load Balancers.

Application Load Balancer components

The following diagram illustrates the basic components. Notice that each listener contains a default rule, and one listener contains another rule that routes requests to a different target group. One target is registered with two target groups.

@isweluiz
isweluiz / README-tomcat-as-systemd-service.md
Created April 22, 2021 16:01 — forked from drmalex07/README-tomcat-as-systemd-service.md
An example configuration for Tomcat as systemd service. #tomcat #systemd #systemd.service

README

Let Tomcat is download and installed under /opt/tomcat. Also, let tomcat be a non-provileged user under which the server will be running.

We assume that we keep server's binaries under /opt/tomcat and we will create a server instance named foo under /var/tomcat/ (carrying its own conf, logs, webapps, work, lib directories). See also https://dzone.com/articles/running-multiple-tomcat.

Create a template service unit file at /etc/systemd/system/[email protected]:

@isweluiz
isweluiz / logstash.conf
Created June 24, 2021 18:08 — forked from cgswong/logstash.conf
Logstash configuration file.
# #####################################################################
# DESC: Logstash configuration file. Typically forwarding logs to
# Elasticsearch instance.
# #####################################################################
# Where to get input
input {
# Get input from standard input device/interface
stdin {
type => "stdin-type"
@isweluiz
isweluiz / logstash.conf
Created June 24, 2021 18:08 — forked from cgswong/logstash.conf
Logstash configuration file.
# #####################################################################
# DESC: Logstash configuration file. Typically forwarding logs to
# Elasticsearch instance.
# #####################################################################
# Where to get input
input {
# Get input from standard input device/interface
stdin {
type => "stdin-type"