Skip to content

Instantly share code, notes, and snippets.

@cas--
cas-- / adventures-in-python-core-dumping.md
Created September 3, 2021 13:41 — forked from toolness/adventures-in-python-core-dumping.md
Adventures in Python Core Dumping

Adventures in Python Core Dumping

After watching Bryan Cantrill's presentation on [Running Aground: Debugging Docker in Production][aground] I got all excited (and strangely nostalgic) about the possibility of core-dumping server-side Python apps whenever they go awry. This would theoretically allow me to fully inspect the state of the program at the point it exploded, rather than relying solely on the information of a stack trace.

#!/usr/bin/env python3
#
# Copyright (c) 2021 Jasper Lievisse Adriaanse <j@jasper.la>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@cas--
cas-- / znc.conf
Last active January 3, 2016 04:39
# znc - IRC Bouncer
description "ZNC IRC bouncer"
author "Calum Lind calumlind@gmail.com"
start on runlevel [2345]
stop on runlevel [016]
respawn
respawn limit 15 5
@cas--
cas-- / version.py
Last active December 27, 2017 12:31 — forked from dcreager/version.py
# -*- coding: utf-8 -*-
# Authors: Douglas Creager <dcreager@dcreager.net>
# Calum Lind <calumlind@gmail.com>
#
# This file is placed into the public domain.
#
# Calculates the current version number by first checking output of “git describe”,
# modified to conform to PEP 386 versioning scheme. If “git describe” fails
# (likely due to using release tarball rather than git working copy), then fall
# back on reading the contents of the RELEASE-VERSION file.