Skip to content

Instantly share code, notes, and snippets.

View norbekaiser's full-sized avatar

Norbert L. Ruehl norbekaiser

View GitHub Profile
@sbstp
sbstp / minecraftd
Last active April 1, 2020 13:55
Wrapper script for the official minecraft server (or spigot) to shut it down gracefully via SIGTERM. Useful to put behind systemd and friends.
#!/usr/bin/env python3
from signal import signal, SIG_IGN, SIGTERM, SIGINT
import subprocess
import sys
USAGE = '''Usage: minecraftd [server jar path] [java options]*'''
JAVA_BIN = '/usr/bin/java'
JAVA_OPTS = ['-XX:+UseParNewGC', '-XX:+UseConcMarkSweepGC',
'-XX:+AggressiveOpts']
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio1_mf_p
#EXTINF:-1,BBC - Radio 2
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio2_mf_p
#EXTINF:-1,BBC - Radio 3
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/format/pls/vpid/bbc_radio_three.pls
#EXTINF:-1,BBC - Radio 4
http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p
#EXTINF:-1,BBC - Radio 5 live
@arantius
arantius / simple-rrd-merge.py
Created March 23, 2012 02:43
A very simple script to merge multiple RRD files, since none of those available seem to work.
#!/usr/bin/env python
"""Simple script to merge multiple RRD files together.
Accepts any number of RRD file names as arguments. Produces an "rrdtool dump"
style file on stdout. The last RRD file should have a slot for every possible
record in the resulting merged RRD.
Run something like:
$ python simple-merge-rrd.py filea.rrd fileb.rrd filec.rrd | \