Skip to content

Instantly share code, notes, and snippets.

View PhrozenByte's full-sized avatar

Daniel Rudolf PhrozenByte

View GitHub Profile
@PhrozenByte
PhrozenByte / munin-plugin.php
Last active February 6, 2016 12:31
Helper functions for Munin plugins written in PHP
<?php
/**
* Helper functions for Munin plugins written in PHP
* Version 1.1 (build 20160206)
*
* Copyright (C) 2016 Daniel Rudolf <www.daniel-rudolf.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License only.
@PhrozenByte
PhrozenByte / ogame-retro-live-resources.user.js
Last active June 6, 2016 14:03
Updates resources in OGame's retro universe using JavaScript
// ==UserScript==
// @name OGame Retro Live Resources
// @namespace 960b5e6b7ff3c701d802352d15941d89
// @description Updates resources in OGame's retro universe using JavaScript
// @author Daniel Rudolf <www.daniel-rudolf.de>
// @license GNU GPL version 3.0 <http://opensource.org/licenses/GPL-3.0>
// @include http://ogame1304.de/game/index.php?page=*
// @downloadURL https://gist.github.com/PhrozenByte/9eb16e643369838cd30f/raw/ogame-retro-live-resources.user.js
// @updateURL https://gist.github.com/PhrozenByte/9eb16e643369838cd30f/raw/ogame-retro-live-resources.user.js
// @version 6
@PhrozenByte
PhrozenByte / openwrt-button-hotplug
Created May 9, 2016 12:21
Improved uci/hotplug based button handler for OpenWrt
#!/bin/sh
# Improved uci/hotplug based button handler for OpenWrt
#
# Copy this file to /etc/hotplug.d/button/00-button and make it executable (chmod +x …)
# Add button event sections to /etc/config/system, e.g.
# config button
# option button 'wps'
# option action 'released'
# option handler '/sbin/reboot'
# option min 5
@PhrozenByte
PhrozenByte / PicoDrafts.php
Created July 22, 2016 15:29
This is a example of a "Drafts" plugin for Pico. Pico is a stupidly simple, blazing fast, flat file CMS. http://picocms.org/
<?php
/**
* Pico Drafts Plugin (example)
*
* This is a example of a "Drafts" plugin for Pico's documentation.
* Pico is a stupidly simple, blazing fast, flat file CMS.
*
* This example plugin basically just removes all pages starting with a `_`
* from Pico's page list. The page will not show up anywhere, however, you
@PhrozenByte
PhrozenByte / VBoxGuestRun.bat
Last active April 11, 2019 20:31
Runs applications inside a VirtualBox VM (VBoxGuestRun.bat) and toggles a VirtualBox VM on/off (VBoxToggle.bat)
@echo off & setlocal
REM Runs applications inside a VirtualBox VM
REM Version 1.1 (build 20160904)
REM
REM Copyright (C) 2016 Daniel Rudolf <www.daniel-rudolf.de>
REM
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, version 3 of the License only.
@PhrozenByte
PhrozenByte / HeadersEqual.pm
Created September 8, 2016 16:03
Compare message headers against each other with SpamAssassin
# <@LICENSE>
# Copyright 2016 Daniel Rudolf <www.daniel-rudolf.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@PhrozenByte
PhrozenByte / all-inkl.md
Last active February 6, 2024 07:47
Dokumentation der Statistikoptionen von (Sub-)Domains bei all-inkl.com

all-inkl.com Access Logs & Webalizer

Leider ist die Dokumentation der verschiedenen Statistikoptionen bei all-inkl.com ziemlich unvollständig und der Tooltip im KAS wenig hilfreich. Insbesondere welchen Einfluss die verschiedenen Optionen auf die Access Logs nehmen ist komplett undokumentiert. Der Einfluss auf die Access Logs ist dabei aber wichtig um zu verstehen welche Zugriffe in den Webalizer-Statistiken erfasst werden.

Access Logs

  • Logs A: Zugriffe werden in logs/access_log_[Datum].gz des Rootverzeichnisses geloggt.
  • Logs B: Zugriffe werden in logs/access_log_[Datum].gz des Domainpfades geloggt.
@PhrozenByte
PhrozenByte / # hetzner-snapshot.md
Last active May 14, 2022 21:50
Shell script to create a snapshot of a Hetzner CX line virtual server

hetzner-snapshot

Shell script to create a snapshot of a Hetzner CX line virtual server.

Install

# script
@PhrozenByte
PhrozenByte / # borg-unattended.md
Last active January 12, 2020 17:45
Shell scripts to run Borg backups unattended

borg-unattended

Shell scripts to run Borg backups unattended.

Install

# backup script
@PhrozenByte
PhrozenByte / munin-plugin.nc_port
Created February 11, 2019 15:29
Munin plugin to probe TCP and UDP ports
#!/bin/bash
: << =cut
=head1 NAME
nc_port - Plugin to monitor TCP/UDP port connectivity
=head1 CONFIGURATION