Skip to content

Instantly share code, notes, and snippets.

tpo /
Last active Jun 11, 2020
understanding patroni

There are two fundamental stages in Patroni:

  • bootstrap
  • running the cluster

Bootstrap stage

In the bootstrap stage, Patroni will:

tpo / 31c3 presentation
Last active Jan 1, 2016
Reviews der Präsentationen am 31. Chaos Computer Congress (31c3) - 2014
View 31c3 presentation
tpo / autodefine.rb
Last active Aug 29, 2015
define? considered evil
View autodefine.rb
# tested with ruby 1.9.3p194
puts "this will not print" if defined?(x)
if false
puts "this neither"
x = "foobar"
tpo / Pascals_WITH.rb
Created Mar 7, 2011
Pascal's WITH in ruby
View Pascals_WITH.rb
# for a long time I wondered why Ruby didn't have Pascal's "WITH"
# construct. It's completely trivial to implent though...
def with object, &block
# now instead of needing to name your object all the time:
object =