Skip to content

Instantly share code, notes, and snippets.


Wolfgang Schnerring wosc

View GitHub Profile
wosc /
Created Jul 8, 2021
Creating tracing data from an haproxy access log via fluent bit and opentelemetry collector

Creating opentelemetry tracing data from an haproxy access log


Unfortunately, otelcol currently has no receiver for logfiles that produces tracing data. There is log tailing functionality, and e.g. a fluent forward protocol receiver, but they all create "log" data, not tracing. I've seen this proof of concept to implement a forward receiver that creates tracing data, but that seems to have no traction and no relation to the upstream project at all (not even git history.

Thus, we've settled on this approach:

wosc /
Created Jan 12, 2019
Launch a command in a new macOS terminal window and block until it exits
# Adapted from
set -euo pipefail
# Needs `flock` command from
# which can be installed via homebrew (which is not on the PATH by default)
export PATH=/usr/local/bin:$PATH
trap "rm -f $tmpf" EXIT
wosc / Vagrantfile
Created Dec 18, 2018
Build unison-2.51.2 deb, compatible with the MacOS binary release
View Vagrantfile
Vagrant.configure("2") do |config|
config.vm.define "default" do |default|
default.vm.hostname = "unisonbuild"
default.vm.provider "lxc" = "zeitonline/bionic64-lxc"
# = "bento/ubuntu-18.04"
wosc /
Created Mar 29, 2018
Automated export of bookmarks from Shaarli
# Export bookmarks from Shaarli <> in Netscape HTML format.
# Adapted from <>
curl="curl -s --cookie-jar $cookies --cookie $cookies"
wosc / routing.yml
Created Jul 14, 2016
Enable basic auth for wallbag export by adding these configuration statements (files are in app/config/)
View routing.yml
path: "/backup/{category}.{format}"
_controller: WallabagCoreBundle:Export:downloadEntries
category: all|unread|starred|archive
format: epub|mobi|pdf|json|xml|txt|csv
#!/usr/bin/env python
import json
import sys
# See
# and
HEADER = u'<!DOCTYPE NETSCAPE-Bookmark-file-1><DL>'
FOOTER = u'</DL>'
ITEM = u'<DT><A HREF="{url}" ADD_DATE="{time_created}" TAGS="{tags}">{title}</A>'
wosc /
Created Apr 13, 2016
Backup all your bookmarks by scraping the UI-facing API
import json
import requests
import sys
def get_bookmarks(entry, auth):
if not entry:
r = requests.get(BASE_URL, auth=auth)
wosc / slack-readline.user.js
Created Feb 18, 2015
Greasmonkey User Script for Slack: Restore Readline Keybindings
View slack-readline.user.js
// ==UserScript==
// @name Slack: Restore Readline Keybindings
// @namespace
// @version 1.0
// @description Don't let Slack capture keybindings for C-u and C-k (use C-o to open omnibox instead)
// @author Wolfgang Schnerring <>
// @match https://**
// @grant none
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am wosc on github.
  • I am wosc ( on keybase.
  • I have a public key whose fingerprint is D062 178B 7F40 C78F 7724 24CE 61F5 821D E73B C3B4

To claim this, I am signing this object:

View gist:5141422
def alias(column_name):
"""returns a descriptor that is usable everywhere the original column name
was: (not really a doctest, sorry)
>>> class Foo(SQLBase):
... original = Column(Integer)
... new = alias('original')
>>> foo = Foo()
>>> = 5