Skip to content

Instantly share code, notes, and snippets.

View PhrozenByte's full-sized avatar

Daniel Rudolf PhrozenByte

View GitHub Profile
@PhrozenByte
PhrozenByte / cron.d.vimbadmin-mb-size
Last active April 11, 2019 20:02
Update ViMbAdmin mail and home size using Dovecots quota dict
#
# /etc/cron.d/vimbadmin-mb-size
# schedules periodic execution of vimbadmin-mb-size script
#
# m h d m w user command
*/5 * * * * root [ -x /usr/local/bin/vimbadmin-mb-size ] && /usr/local/bin/vimbadmin-mb-size --database "vimbadmin" --quota-table "quota"
@PhrozenByte
PhrozenByte / cron.daily.update-flashplugin-nonfree
Last active March 11, 2016 15:43
/etc/cron.daily/update-flashplugin-nonfree
#!/bin/bash
# cron.daily.update-flashplugin-nonfree
# Version 2.2
#
# SHORT DESCRIPTION:
# Daily cronjob executing Debian's `update-flashplugin-nonfree' command
#
# COPYRIGHT AND LICENSING:
# Copyright (C) 2014-2016 Daniel Rudolf <http://www.daniel-rudolf.de/>
#
@PhrozenByte
PhrozenByte / gitweb.site_footer.html
Created June 22, 2015 01:55
Gitweb site footer (adds support for jQuery-Prettify)
@PhrozenByte
PhrozenByte / # mta-server.md
Last active February 6, 2016 14:45
Daemonize Multi Theft Auto (MTA) servers

PhrozenByte Multi Theft Auto (MTA)

Daemonize Multi Theft Auto (MTA) servers

Usage

  • Install screen (e.g. apt-get install screen)
  • Copy mta-server to /usr/local/bin and make it executable
  • Copy start-mta-server and cleanup-mta-server to your MTA server directory (default server should be at /opt/mta/default) and make them executable
@PhrozenByte
PhrozenByte / # awstats-update.md
Last active April 28, 2016 18:48
Update AWStats database and/or generate static HTML pages -- MOVED TO https://github.com/PhrozenByte/awstats-update
@PhrozenByte
PhrozenByte / munin-plugin.vimbadmin_count
Last active April 11, 2019 19:49
Munin plugins for ViMbAdmin
#!/usr/bin/env php
<?php
/**
* ViMbAdmin munin plugin
* Version 2.4 (build 20190411)
*
* SHORT DESCRIPTION:
* Monitors the number of domains, mailboxes and aliases.
*
* DEPENDENCIES:
@PhrozenByte
PhrozenByte / munin-plugin.openvpn_
Last active April 6, 2022 23:46
Munin plugin for OpenVPN
#!/usr/bin/env php
<?php
/**
* OpenVPN munin plugin
* Version 1.4 (build 20160206)
*
* SHORT DESCRIPTION:
* Monitors the number of connected OpenVPN clients and their bandwidth
* usage (server mode) or the payload and raw bandwidth usage of a client.
*
@PhrozenByte
PhrozenByte / pavol
Last active March 30, 2019 14:45
Zenity dialog to set audio volume using PulseAudio
#!/bin/bash
SINK="$(pacmd list-sinks | awk '/* index: [0-9]+/{ print $3 }')"
# current volume snippet taken
# from pulseaudio-ctl <https://github.com/graysky2/pulseaudio-ctl>
# by graysky <[email protected]>, licensed under MIT
CURVOL="$(pacmd list-sinks | grep -A 15 '* index' | awk '/volume: /{ print $3 }' | grep -m 1 % | sed 's/[%|,]//g')"
[ -n "$CURVOL" ] || CURVOL="$(pacmd list-sinks | grep -A 15 '* index' | awk '/volume: front/{ print $5 }' | sed 's/[%|,]//g')"
[ -n "$CURVOL" ] || CURVOL=100
@PhrozenByte
PhrozenByte / MPDO.php
Created January 18, 2016 18:36
MPDO - a "magical" extension to PHP's PDO with features, a programmer could miss sorely when using PDO.
<?php
namespace PhrozenByte\MPDO;
use PDO;
use PhrozenByte\MPDOStatement;
use RuntimeException;
/**
* The MPDO class
*
@PhrozenByte
PhrozenByte / # letsencrypt.md
Last active May 10, 2022 13:31
Simple wrapper scripts for acme-tiny to issue and renew Let's Encrypt SSL certificates -- MOVED TO https://github.com/PhrozenByte/acme