Skip to content

Instantly share code, notes, and snippets.

Avatar
:bowtie:

Kostas Christidis kchristidis

:bowtie:
View GitHub Profile
@kchristidis
kchristidis / redis-aggregate.lua
Created Oct 9, 2020 — forked from lloydzhou/redis-aggregate.lua
Aggregate values in a redis sorted set. Returns {count, sum, min, max}
View redis-aggregate.lua
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 Dec 8, 2017
Rough sketch showing how the two servers interact with each other. We only expose the EventsServer.
View fab-7069.txt
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ peer │
│ │
┌───────────────┐ │ │
│ │ │ │
│ │ │
@kchristidis
kchristidis / protobuf-serialization.md
Last active Mar 9, 2022
Notes on protocol buffers and deterministic serialization (or lack thereof)
View protobuf-serialization.md

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.

View gerrit-workflow.md

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