Skip to content

Instantly share code, notes, and snippets.

@metalivedev
metalivedev / gist:ce45d4278410807a91e3
Last active August 29, 2015 14:01 — forked from samalba/gist:5400413
Clean up hung kworkers, usually caused by some container
echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
cat /sys/kernel/debug/tracing/trace_pipe > out.txt
# (Leave it running a couple of seconds, then Ctrl+C; this is just to flush the buffer)
# Do it again to get fresh info
cat /sys/kernel/debug/tracing/trace_pipe > out.txt
(Leave it running a couple of seconds, then Ctrl+C; this is to recover the data)
cut -d- -f2 out.txt | awk '{print $1}' | sort | uniq -c | sort -n
# Take a look at who's got the most instructions queued (first column) and kill them and their children
# Sam dumped something out of the cgroup to get the process list and ran xargs kill -9
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests

Rectifier

The diode bridge is the simplest rectifier I know.

Rectifier lets you share a directory with a docker container (just like $yourvm shared folders).

You don't have to install anything in your containers, and you only need to install diod in the host. diod is packaged on Ubuntu/Debian distros, and will automatically be apt-get install-ed if needed.

Since it uses diod to make a bridge, I called it rectifier. Yeah, that sucks, so if you have a better name, I'll steal it!