Skip to content

Instantly share code, notes, and snippets.

@Adurol
Adurol / Automated local install with cloud-init for Ubuntu Server.md
Last active November 26, 2023 17:20
Automated local install with cloud-init for Ubuntu Server

Automated local install with cloud-init for Ubuntu Server

TLDR: Plug in a usb drive to install Ubuntu Server automagical.

Requirements

@simonw
simonw / recover_source_code.md
Last active September 28, 2024 08:10
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb