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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GopenPGP 2.7.2 | |
Comment: https://gopenpgp.org | |
xsBNBGYsEpYBCADiv5xcmCk/MtP/pPhxISy8mBLMbb3IREQwX8iVHTlaEKsYRi8n | |
wJS/am0ByBJyVZ/A2kJ/r/oz5uTndO7Zi81ldK4SAbJHtaTi2HiMcbQDJHhCtri8 | |
tC6+A7XPGgfLqBkQxiH3fT6pY8EgyV/Hz6mCjnotWXRqYD45aGZCTxMlL/Gi7286 | |
Ltt8rL1KNEtqrQM7inw5bWbvDyLYtgzEj9cxWf/iusElhJZ47YX7WGPJGshB1WQn | |
ZRe4fdUXHdYCjINTy/jUudXPGVFp1ZlWtJP1Ui/RMOgyq7YSi4lnwXsePsY3bcGK | |
BVSlNIUVlfZaHSGxF2g1FmsiPVGHDCYB9Da1ABEBAAHNSkZNX05FVFpVTl9DQVJE |
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
# feb/11/2022 11:00:55 by RouterOS 7.2rc3 | |
# software id = 9QK9-C798 | |
# | |
# model = RB5009UG+S+ | |
# serial number = XXXXXXXXXX | |
/ip settings set allow-fast-path=no | |
/interface bridge add admin-mac=FF:FF:FF:FF:FF:FF auto-mac=no name=bridge |
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
Value Description Reference | |
100 Continue [RFC7231, Section 6.2.1] | |
101 Switching Protocols [RFC7231, Section 6.2.2] | |
102 Processing [RFC2518] | |
103 Early Hints [RFC8297] | |
104-199 Unassigned | |
200 OK [RFC7231, Section 6.3.1] | |
201 Created [RFC7231, Section 6.3.2] | |
202 Accepted [RFC7231, Section 6.3.3] |
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
// Utilizador pode chamar passando qualquer objeto que implemente io.Writer, inclusive os.File | |
func escreverInfo(destino io.Writer){ | |
(…) | |
} |
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
// Utilizador é obrigado a chamar com parametro *os.File | |
func escreverInfo(destino *os.File){ | |
(…) | |
} |
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
// continuação, exemplo de uso de MsgOla | |
func enviaMsg(msg IMsgBasica){ | |
(…) | |
} | |
//criando objeto MsgOla | |
msg := &MsgOla{} | |
msg.SetTexto("Olá duck typing!") | |
// msg é aceito pela interface IMsgBasica por duck typing | |
enviaMsg(msg) |
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
// Exemplo em GO | |
type IMsgBasica interface{ | |
SetTexto(valor string) | |
} | |
// Exemplo de objeto | |
type MsgOla struct{ | |
(…) | |
} | |
// Ao definir este método MsgOla "se parece" com IMsgBasica | |
// logo implementa a interface e poderá ser utilizada |
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
// Exemplo em Java | |
void enviaMsg(IMsgBasica msg){ | |
// quem precisar chamar este método deve fornecer como | |
// parâmetro algum objeto que implemente a | |
// interface IMsgBasica | |
} | |
// Exemplo de objeto necessário | |
class MsgOla implements IMsgBasica{ | |
(…) | |
} |
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
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql |
NewerOlder