Skip to content

Instantly share code, notes, and snippets.

View abrain's full-sized avatar
🚀

Andreas Brain abrain

🚀
View GitHub Profile
import sys
import numpy
from PIL import Image
if __name__ == "__main__":
if len(sys.argv) < 2:
print "Please specify a file"
exit(1)
@abrain
abrain / unblock-einsatzberichte.php
Last active August 29, 2015 14:13
Zeigt Einsatzberichte aus Einsatzverwaltung trotz Sperre von Beiträgen/Artikel durch wp-members
<?php
/*
Plugin Name: Unblock Einsatzberichte
Description: Zeigt Einsatzberichte aus Einsatzverwaltung trotz Sperre von Beiträgen/Artikel durch wp-members
Version: 0.1
Author: Andreas Brain
Author URI: http://www.abrain.de
License: GPLv2
*/

Keybase proof

I hereby claim:

  • I am abrain on github.
  • I am abrain (https://keybase.io/abrain) on keybase.
  • I have a public key ASBC838MLHnNY1AzrQwmP9QEFzKl3v1PjeWGfWgsqRPQfAo

To claim this, I am signing this object:

@abrain
abrain / mosquitto.service
Created May 7, 2018 21:07 — forked from chazcheadle/mosquitto.service
Mosquitto MQTT Broker systemd start up script
[Unit]
Description=Mosquitto MQTT Broker daemon
ConditionPathExists=/etc/mosquitto/mosquitto.conf
After=network.target
Requires=network.target
[Service]
Type=forking
RemainAfterExit=no
StartLimitInterval=0
@abrain
abrain / el-zu-gf.php
Last active April 14, 2021 09:06
Adaption for the WordPress plugin Einsatzverwaltung that replaces a certain word in the output of a single incident report without changing the plugin code.
<?php
/*
Plugin Name: Einsatzverwaltung Customisations
Description: Benennt in Einsatzberichten den Einsatzleiter zum Gruppenführer um
Version: 0.1
Author: Andreas Brain
Author URI: https://www.abrain.de
License: GPLv2
*/
@abrain
abrain / prefix_the_title.php
Created April 1, 2020 15:12
Adaption for the WordPress plugin Einsatzverwaltung that prefixes the title of incident reports only in the main blog view
<?php
add_filter('the_title', function ($title, $postId) {
// Do not change anything while we are in wp-admin
if (is_admin()) {
return $title;
}
// Do not alter the title of other post types or outside the main blog overview
if (get_post_type($postId) !== 'einsatz' || !is_home() || !in_the_loop()) {
@abrain
abrain / einsatzliste_rename.php
Created September 21, 2021 11:12
Adaption for the WordPress plugin Einsatzverwaltung that replaces a certain word in the output of the einsatzliste shortcode without changing the plugin code.
<?php
/*
Plugin Name: Einsatzverwaltung Customisations
Description: Benennt in Einsatzlisten die Einsatzart zu Meldebild um
Version: 0.1
Author: Andreas Brain
Author URI: https://www.abrain.de
License: GPLv2
*/