This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# === INFO === | |
# altnetworking.sh | |
# Description: Run the specified application in a custom networking environment. | |
# Uses cgroups to run process(es) in a network environment of your own choosing (within limits!) | |
VERSION="0.2.0" | |
# Author: John Clark | |
# adapted for cgroups v2 by Anselm Kruis | |
# Requirements: Debian 11 bullseye |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Created on 27.02.2021 | |
@author: anselm | |
''' | |
# Some code copied from | |
# | |
# forbiddenfruit - Patch built-in python objects | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
A prove of concept for pickling / unpickling an asyncio.Task object | |
Limitations of this demo code: | |
- Requires Stackless Python 3.7, because this Python implementation can pickle coroutine objects. | |
- Uses the pure python task implementation asyncio.tasks._PyTask | |
Copyright (C) 2021 Anselm Kruis |