Skip to content

Instantly share code, notes, and snippets.

View hynek's full-sized avatar
On vacation, very AFK

Hynek Schlawack hynek

On vacation, very AFK
View GitHub Profile
hynek / haproxy-ingress.hcl
Created January 29, 2021 06:28 — forked from mister2d/haproxy-ingress.hcl
nomad job for HAProxy ingress
job "ingress" {
region = "global"
datacenters = ["home"]
type = "service"
constraint {
attribute = "${meta.proxy_type}"
value = "internal"

attrs 20.1.0 released!

I’m thrilled to finally present attrs 20.1.0 with the following changes:

  • bug fixes
  • performance improvements


This release is HUGE and I'm stoked we can finally get it to you! It’s the result of more than a year of development and not only does it come with many great features that users desired for a long time, it also lays the foundation for the future evolution of this package.

hynek /
Last active August 31, 2019 09:26
Why English is Difficult vol. 42

From “Simply English – An A to Z of Avoidable Errors” by Simon Heffer:

Here are some of the most common mistakes with the choice of prepositions: they are often made when a demotic usage seeps into the consciousness of supposedly educated people. A person is absorbed in a task, not by it; but liquid may be absorbed by a sponge. One acquiesces in something, not with it, and one connives at something, not in it. One aims at something, not for it. One becomes angry with someone, not at him. One is ashamed of bad behaviour, not by it. A decision is between one thing and another, not one thing or another. One is bored by or with something, never of it. Something is different from something else, not to it or, even more abominable, than it. One is disgusted with something, not by it. One becomes fed up with things, not of them. Something is identical to something else, not with it. One inculcates something on somebody, one does not inculcate somebody with something;

Keybase proof

I hereby claim:

  • I am hynek on github.
  • I am hynek ( on keybase.
  • I have a public key ASDkAwIXkdnAy7LSXIpEzfF8oNCnq-L0lkU5qk1QwZIyNwo

To claim this, I am signing this object:

hynek / Example Usage
Last active November 26, 2016 19:10
PoC of using attrs’s upcoming metadata feature for using declarative application configuration from env variables including envconsul’s HashiCorp Vault support.
WhoisConfig(env='dev', prometheus=Prometheus(address='', port='7000', consul_token='abc'))
hynek /
Last active March 6, 2024 04:55
This is an attempt to emulate uWSGI’s uwsgi.worker_id() that ensures that I have worker IDs from 1…--workers which is useful in logging and instrumentation where changing PIDs are annoying.
import os
def on_starting(server):
Attach a set of IDs that can be temporarily re-used.
Used on reloads when each worker exists twice.
server._worker_id_overload = set()

A memorandum from Winston Churchill to the War Cabinet from 1940-08-09. Originally seen in and typed up for accessibility reasons.


To do our work, we all have to read a mass of papers. Nearly all of them are far too long. This wastes time, while energy has to be spent in looking for the essential points.

I ask my colleagues and their staffs to see to it that their Reports are shorter.

  1. The aim should be Reports which set out the main points in a series of short, crisp paragraphs.
  2. If a Report relies on detailed analysis of some complicated factors, or on statistics, these should be set out in an Appendix.

Contributor Covenant Code of Conduct

Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

Our Standards

Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
New python executable in /Users/hynek/.virtualenvs/6a3208995e966073/bin/python
Installing setuptools, pip...done.
«6a3208995e966073» ~
↪︎ pip install cryptography
DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated. See
Downloading/unpacking cryptography
Using download cache from /Users/hynek/.pip/cache/
Running (path:/Users/hynek/.virtualenvs/6a3208995e966073/build/cryptography/ egg_info for package cryptography
no previously-included directories found matching 'documentation/_build'