This file contains hidden or 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
#OBJETIVO: ler a entrada de um arquivo aberto com letras minúsculas, | |
#e convertê-las em maiúsculas, salvando o conteúdo em outro arquivo | |
# | |
#PROCESSAMENTO: 1- Abrir o arquivo de entrada | |
#2- Abrir o arquivo de saída | |
#3 - Enquanto não chegamos ao final do arquivo de entrada | |
# a) leia parte do arquivo no buffer | |
# b) passe por cada byte da memória | |
# se o byte for uma letra minúscula, converta-a em maiúscula | |
# c) escreva o buffer no arquivo de saída |
This file contains hidden or 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
.section .data | |
data_items1: .long 3,67,34,222,45,75,54,34,44,33,22,11,66,0 | |
data_items2: .long 20,40,60,70,24,65,17,23,75,35,14,34,29,0 | |
data_items3: .long 46,57,76,14,13,58,34,49,24,63,25,48,64,0 | |
.section .text | |
.globl _start | |
.globl max | |
_start: | |
# primeiro data_items | |
pushl $data_items1 |
This file contains hidden or 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
.section .data | |
.section .text | |
.globl _start | |
.globl square | |
_start: | |
pushl $5 | |
call square |
This file contains hidden or 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
############################################### | |
# Como fazer deploy para o servidor com o git # | |
############################################### | |
# Na sua Maquina | |
# Crie uma pasta | |
$ mkdir repo && cd repo | |
# Inicie um repositorio vazio |
This file contains hidden or 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
Expressoes Regulares | |
^ - Começo de linha | |
$ - Fim da linha | |
[abc] -letras 'a' ou 'b' ou 'c' | |
[a-d] -lista de 'a' a 'd' | |
[a-z] -lista de 'a' a 'z' | |
[a-zA-Z] -lista de letras minusculas e maiusculas | |
[^a-d] -lista negada, ou seja, qualquer coisa diferente de 'a' ou 'b' ou 'c' ou 'd' | |
| -Ou ex: (esse|aquele) |
This file contains hidden or 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 | |
WORKDIR="/root/firewall" | |
############################################ | |
# Libera somente o range de ips do arquivo # | |
############################################ | |
# Arquivo com range de ips para liberar. | |
ARQUIVO="accept_ip.txt" | |
IPT=$(which iptables) # atalho para comando |
This file contains hidden or 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
5.63.26.0-5.63.26.255 | |
85.238.128.0-85.238.159.255 | |
139.82.0.0-139.82.255.255 | |
143.54.0.0-143.54.255.255 | |
143.106.0.0-143.106.255.255 | |
143.107.0.0-143.107.255.255 | |
143.108.0.0-143.108.255.255 | |
146.134.0.0-146.134.255.255 | |
146.164.0.0-146.164.255.255 | |
147.65.0.0-147.65.255.255 |
This file contains hidden or 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 | |
WORKDIR="/root/firewall" | |
############################################################ | |
# Seta o firewall com iptables para bloquear tudo # | |
# que nao esteja no range de ips ou dominios permitidos. # | |
############################################################ | |
# Arquivo com os ranges de ip permitidos | |
ARQUIVO="accept_ip_range.txt" |
NewerOlder