Skip to content

Instantly share code, notes, and snippets.

View MorbZ's full-sized avatar

Merten Peetz MorbZ

View GitHub Profile
@MorbZ
MorbZ / plexmediaserver
Created February 22, 2017 13:33 — forked from schwuk/plexmediaserver
UFW Application Profile for Plex Media Server
[plexmediaserver]
title=Plex Media Server
description=The Plex Media Server is smart software that makes playing Movies, TV Shows and other media on your computer simple
ports=32400/tcp|1900/udp|3005/tcp|5353/udp|8324/tcp|32410/udp|32412:32414/udp|32469/tcp
@MorbZ
MorbZ / plex.py
Last active May 18, 2024 03:12
Munin plugin for Plex: Shows playing streams and transcoding sessions
#!/usr/bin/env python
# If the server needs authentication add file /etc/munin/plugin-conf.d/plex:
# [plex]
# env.plex_token yourplextoken
import urllib2, sys, os
import xml.etree.ElementTree as ET
# Show Config
if len(sys.argv) > 1 and sys.argv[1] == 'config':
@MorbZ
MorbZ / MultiByteStrUtil.as
Created June 7, 2013 00:57
This AS3 class handles strings with UTF-8 multibyte characters (up to 4 bytes/character). Currently it is able to split a String into its characters, concatenate chars to a string, give the binary and the unicode representation of a character and remove symbols/emojis from a string.
package utils
{
import flash.errors.EOFError;
import flash.utils.ByteArray;
/**
* This AS3 class handles strings with UTF-8 multibyte characters (up to 4 bytes/character).
* Currently it is able to split a String into its characters, concatenate chars to a string,
* give the binary and the unicode representation of a character and remove symbols/emojis from
* a string.