Skip to content

Instantly share code, notes, and snippets.

View catroll's full-sized avatar

胡昂 catroll

View GitHub Profile
@catroll
catroll / twisted_debug.py
Created June 5, 2018 07:27
twisted debug
import txaio
txaio.start_logging(level='debug')
from twisted.python import log
observer = log.PythonLoggingObserver(loggerName=__name__)
observer.start()
@Forst
Forst / build.sh
Last active October 25, 2022 23:43
Ubuntu ISO with preseed.cfg generation script
#!/bin/bash
## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT
# Quit on first error
set -e
# Temporary directory for the build
TMP="/var/tmp/ubuntu-build"
import logging
import time
logger = logging.getLogger(__name__)
def useful():
logger.debug('Hello from webapplib!')
time.sleep(0.01)