Categories
Uncategorized

Syntax highlighting with wordpress

This is just a test for syntax highlighting. Which I really really really wanted to have. Even if it’s WordPress and not something cool like hugo. So, let’s try: import random class RndTest: def __init__(self): print(“Oy! ‘this is python!”) self.rnd_seed = random.random() @classmethod def do_nothing(cls, nothing): print(“Doing {} now ;)”.format(nothing)) That doesn’t look so bad, […]

Categories
Snippets

PyCharm, Arch linux & Python 3.6

Love Python. Love PyCharm. Love Arch Linux. Unfortunately Arch sneakily updated Python to 3.6. Cool, new version … but hey, why don’t my debug runs in PyCharm work any more?? ImportError: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory Yup, pretty confusing. It seems unable to find shared python 3.5 library. Well. […]

Categories
Docker Infrastructure Snippets

Logs with docker and logstash

It would be nice to have all container logs from a docker cluster sent to … let’s say, an ELK stack. Right? Right. So we did: on each host in the cluster, we use the GELF log driver to send all logs to a logstash instance the logstash instance clones each request using type “ELK” […]

Categories
Snippets

Logstash, clone filter & add_field mysteries

That’s a really great piece of documentation. This does not work: # let’s clone each event, one goes to somewhere, one goes to somewhere else. # note this was copy-pasted from the docs! # see here: https://is.gd/QSHNps # again. THIS DOES NOT WORK. filter { clone { add_field => { “token” => “ABCDEF” } } […]