Skip to content

Instantly share code, notes, and snippets.

View KoffeinFlummi's full-sized avatar

Felix Wiegand KoffeinFlummi

  • Darmstadt, Germany
View GitHub Profile
@simonw
simonw / recover_source_code.md
Last active June 21, 2024 00:11
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
@fz6
fz6 / dah_generator.py
Created May 21, 2015 18:44
DevOps Against Humanity Generator
# wget https://raw.githubusercontent.com/bridgetkromhout/devops-against-humanity/b824d328392ea5c27026f917653e35da1b12b0f8/cards-DevOpsAgainstHumanity.csv
WHITE_CARDS = []
BLACK_CARDS = []
FILL_ME_IN = "_____"
from random import choice
def load():
global WHITE_CARDS
@XVilka
XVilka / TrueColour.md
Last active June 10, 2024 17:21
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!