Skip to content

Instantly share code, notes, and snippets.

View kchristidis's full-sized avatar
:bowtie:

Kostas Christidis kchristidis

:bowtie:
View GitHub Profile
@kchristidis
kchristidis / protobuf-serialization.md
Last active April 12, 2024 20:09
Notes on protocol buffers and deterministic serialization (or lack thereof)

There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.

Protocol Buffers v3.0.0. release notes:

The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.

Maps documentation:

Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.

@kchristidis
kchristidis / redis-aggregate.lua
Created October 9, 2020 05:53 — forked from lloydzhou/redis-aggregate.lua
Aggregate values in a redis sorted set. Returns {count, sum, min, max}
local count = 0
local sum = 0
local min = 0
local max = 0
local cursor = "0"
local result = nil
local data = nil
repeat
result = redis.call("zscan", KEYS[1], cursor, "count", 100)
@kchristidis
kchristidis / fab-7069.txt
Created December 8, 2017 17:32
Rough sketch showing how the two servers interact with each other. We only expose the EventsServer.
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ peer │
│ │
┌───────────────┐ │ │
│ │ │ │
│ │ │

Committing a change

  1. git checkout master
  2. git pull
  3. git checkout -b TOPIC_BRANCH origin/master
  4. [do your thing here]
  5. git commit -a -s
  6. git pull --rebase origin master
  7. git rebase -i origin/master # if you want to squash commits
  8. git show