This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Id": "Policy1556318075116", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1556317630862", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::cdn.example/videos/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#CONTEUDO PARA O SYSCTL.CONF | |
# Aumentar o num. max de conex tcp orfans | |
# Conexões que foram encerrados e já não têm um identificador de arquivo anexado a eles | |
net.ipv4.tcp_max_orphans = 262144 | |
# Aumentar o número de conexões | |
net.core.somaxconn = 16384 | |
# Aumentar o número de conexões de entrada backlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# ## BEGIN INIT INFO | |
# Provides: Firewall | |
# Required-Start: $all | |
# Required-Stop: | |
# Should-Start: S | |
# Should-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.8 | |
import ipaddress | |
decip = 2887123457 # Example for 172.22.2.1 | |
ip = str(ipaddress.IPv4Address(decip)) | |
print(ip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
path="/opt/kafka_2.12-2.2.2/bin" | |
$path/kafka-topics.sh --zookeeper zookeeper.intranet:2181 --list | grep -v "__consumer_offsets" > topic.txt | |
cat topic.txt | while read line | |
do | |
partitions=`$path/kafka-topics.sh --describe --zookeeper zookeeper.intranet:2181 --topic $line | grep PartitionCount | awk '{ print $1,$2 }'` | |
echo $partitions | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
Host * | |
# ForwardAgent no | |
# ForwardX11 no | |
# ForwardX11Trusted yes | |
# PasswordAuthentication yes | |
# HostbasedAuthentication no | |
# GSSAPIAuthentication no | |
# GSSAPIDelegateCredentials no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[defaults] | |
inventory = ./conf/host | |
local_tmp = ./.tmp | |
roles_path = ./roles | |
remote_user = ec2-user | |
internal_poll_interval = 0.001 | |
interpreter_python = /usr/bin/python | |
forks = 20 | |
callback_whitelist = profile_tasks | |
log_path = ./logs/ansible.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
: ' | |
DESAFIO: | |
Dado um arquivo de log do apache (acess.log) com diversas linhas semelhantes a abaixo: | |
172.19.0.100 - - [18/Feb/2020:22:35:10 +0000] "GET /index HTTP/1.1" 200 31067 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)" "172.19.0.2" | |
172.19.0.103 - - [15/Feb/2020:22:32:02 +0000] "GET /index HTTP/1.1" 200 14034 "-" "Mozilla/5.0 (compatible; SemrushBot/6~bl; +http://www.semrush.com/bot.html)" "172.19.0.4" | |
172.19.0.104 - - [16/Feb/2020:22:31:32 +0000] "GET /site HTTP/1.1" 200 36565 "https://command-not-found.com/curl" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" "172.19.0.3" | |
172.19.0.105 - - [16/Feb/2020:22:30:10 +0000] "GET /credits HTTP/1.1" 200 31067 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)" "172.19.0.2" |
OlderNewer