Skip to content

Instantly share code, notes, and snippets.

View bltavares's full-sized avatar
💭
I may be slow to respond.

Bruno Tavares bltavares

💭
I may be slow to respond.
View GitHub Profile
@bltavares
bltavares / rust.rs
Last active February 8, 2020 16:32
pub fn with_discovery(&mut self, mechanisms: Vec<impl Stream<Item = SocketAddr>>) {
let stream = mechanisms
.into_iter()
.fold(stream::pending(), |init, item| init.merge(item));
/// mismatched types
/// expected struct `async_std::stream::pending::Pending<_>`
/// found struct `async_std::stream::stream::merge::Merge<async_std::stream::pending::Pending<_>, impl Stream<Item = SocketAddr>>`
}
handshaken, sending want
Ignoring feed discoveryKey: ",=\002\356P9Qd\341 \373J\377\214\277\305 S_\035j6\327\006\003s\242$G\216\262\306" @ 1
Received message "2c3d02ee50395164e120fb4aff8cbfc520535f1d6a36d7060373a224478eb2c6"
Metadata audit: Ok(Audit { valid_blocks: 0, invalid_blocks: 0 })
Metadata len: 4
@bltavares
bltavares / rust-sp-march.md
Created February 1, 2020 22:31
rust-sp-march.md

Lugar: ThoughtWorks SP

Data: 07 Marco

Endereco: Av Paulista 2300

Empresa/Nome do contato: ThoughtWorks / @Daniel Pilon

collected info 0 dat://"5db1de5611f405cc7f362f31e2bfe5f74444634b567c37289a18ec9caf8ccc45"
collected info 1 dat://"2c3d02ee50395164e120fb4aff8cbfc520535f1d6a36d7060373a224478eb2c6"
Compiling colmeia-dat-proto v0.1.0 (C:\Users\bltav\repos\colmeia\colmeia-dat-proto)
Compiling colmeia v0.1.0 (C:\Users\bltav\repos\colmeia)
Finished dev [unoptimized + debuginfo] target(s) in 6.45s
Running `target\debug\colmeia-nc.exe 127.0.0.1:3282 dat://460f04cf12c3b9833e5a0d3dd8eea05eab59dd8c1438a7454afe9630b9b4f8bd`
[2020-01-26T16:46:34Z DEBUG colmeia_dat_proto::socket] content to read 1
[2020-01-26T16:46:34Z DEBUG colmeia_dat_proto::socket] original content [61]
[2020-01-26T16:46:34Z DEBUG colmeia_dat_proto::socket] maybe encrypted content [61]
[2020-01-26T16:46:34Z DEBUG colmeia_dat_proto::socket] content to read 61
[2020-01-26T16:46:34Z DEBUG colmeia_dat_proto::socket] original content [0, 10, 32, 250, 182, 154, 103, 52, 211, 221, 131, 78, 152, 109, 24, 179, 67, 132, 102, 87, 171, 209, 60, 187, 89, 166, 247, 139, 102, 133, 137, 83, 119, 55, 175, 18, 24, 89, 189, 224, 209, 85, 49, 229, 107, 66, 146, 183, 244, 34, 61, 167, 251, 188, 203, 45, 160, 208, 239, 235, 165]
[2020-01-26T16:46:34Z D
PS C:\Users\bltav\repos\colmeia> cargo run --bin colmeia-nc -- 127.0.0.1:3282
Open(discoveryKey: "\315\2057\024kP\313\025\276\316\364\006?\371`z\036{w\016@\215\021\345\260\273\341\340\227\214\213m" capability: "\2345}x\214\312\020\304\002q0\237NN\362\206\223(\336\215\n\315N\220")
PS C:\Users\bltav\repos\colmeia> cargo run --bin colmeia-nc -- 127.0.0.1:62497
Open(discoveryKey: "\317\203\277L\032\340\267\224\033\004\240\035\220\207\177b3D\310-\262\212\351j\030\330\307-\307^\006c" capability: "\300o\326\200=\205\230\n\010\303|\317K\262i\374\005\240\254\324tL\247\033")
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Length to read 61
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Encoded channel-type 0
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Msg channel 0
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Msg type 0
Message { header: Header { length: 61, channel: 0, msg_type: 0 }, body: [10, 32, 250, 182, 154, 103, 52, 211, 221, 131, 78, 152, 109, 24, 179, 67, 132, 102, 87, 171, 209, 60, 187, 89, 166, 247, 139, 102, 133, 137, 83, 119, 55, 175, 18, 24, 218, 122, 195, 162, 218, 23, 242, 167, 56, 246, 15, 196, 128, 50, 131, 226, 86, 69, 191, 207, 176, 171, 133, 60, 100] }
Body lenght: 61
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Length to read 9355
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Encoded channel-type 11065
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Msg channel 691
[2020-01-22T12:19:51Z DEBUG colmeia_proto] Msg type 9
diff --git a/core/Cargo.toml b/core/Cargo.toml
index b5d5780..f659e83 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -26,7 +26,7 @@ multihash = { package = "parity-multihash", version = "0.2.0", path = "../misc/m
multistream-select = { version = "0.6.0", path = "../misc/multistream-select" }
parking_lot = "0.9.0"
pin-project = "0.4.6"
-protobuf = "2.8"
+protobuf = "=2.8.1"
@bltavares
bltavares / README.md
Created December 26, 2019 02:00
Links aleatórios mas nem tanto

Como comunicar melhor suas intenções (útil pra crashes, ops, e tarefas no dia a dia da equipe) https://medium.com/@ElizAyer/dont-ask-forgiveness-radiate-intent-d36fd22393a3 https://blog.glowforge.com/strong-opinions-loosely-held-might-be-the-worst-idea-in-tech/ https://medium.com/@copyconstruct/effective-mental-models-for-code-and-systems-7c55918f1b3e

Convivence Rules do Recurse Center Gosto muito de como tem umas regras simples, que podem ser apresentadas pra equipe como uma sugestão para tornar o dia a dia melhor, ainda mais agora que estamos recebendo muitas pessoas novas ao mesmo tempo. Sugiro ler, e pensar em sugerir pra equipe ler também em uma Retro, caso seja uma equipe com muita gente mais nova.  https://www.recurse.com/manual#sec-principles

Material relacionado a pensar sobre seu crescimento profissional, pra ajudar com o self-assessment