Monitor WordPress Updates with Zabbix

Just another quick Zabbix related post: Since WordPress is known to be a remote shell with the extra feature of being a web blog[1], it is a good idea, to at least keep your WordPress installations up-to-date. In the currently ongoing effort to replace myself with a more or less clever collection of servers, VMs and shell scripts, I decided to use Zabbix to track the most recent WordPress version and get notifications, when it changes.

If you want to do the same, keep reading!

  1. http://www.bash.org/?949214 []
Comment on this article

monit - make broken things work

I set up monit, a utility for monitoring services on a Unix system. My concrete use case is a FreeBSD machine, that runs "N2N Edge", a Peer-to-peer (P2P) virtual private network (VPN) software. monit pretty much automates the "have you tried turning it off and on again?" process. Configurations like the following illustrate this:

check process myproc
        matching "myproc"
        start program = "/etc/init.d/myprocstart"
        stop program = "/usr/bin/killall myproc"
        if cpu usage > 95% for 10 cycles then restart

Do you want to know more?

Comment on this article

LaTeX Übungsschein Vorlage

Ich habe[1] nach etwa einer Stunde die Suche nach einer LaTeX Vorlage für Übungsscheine erfolglos abgebrochen und eine eigene entworfen. Um dem einen oder anderen wissenschaftlichen Mitarbeiter das Leben zu erleichtern ist hier das Ergebnis meiner Mühen. Das ist jetzt natürlich auf die TU Berlin zugeschnitten und verwendet deswegen auch das offizielle TU Berlin Logo, aber es sollte keine große Schwierigkeit darstellen, es an die eigenen Bedürfnisse anzupassen.

Die Verwendung sollte recht selbsterklärend sein. Es druckt pro DIN-A4 Seite zwei Übungsscheine. Wenn die Seite exakt in der Mitte geteilt wird, sollten die Seitenränder passen und in etwa 7mm betragen. In meinen Tests ist das Ergebnis jedenfalls passabel und muss abgesehen vom Trennschnit auf A5 nicht weiter zugeschnitten werden.

  1. This post is in German and I am not sure if this is even internationally relevant. []
Comment on this article

Adobe Customization Wizard

I recently noticed that RdrCEF.exe was clocking close to all of my CPU cycles. This is a cloud service built into Adobe Reader DC, which constantly sends all kinds of information to Amazon. Leaving all the privacy concerns aside, my computer became inoperable by opening a PDF document. Okay, here's how you fix this.

  • Download the Adobe Wizard, most likely the version for Adobe DC.
  • Put on your robe and your wizard hat.
  • Get yourself your preferred Adobe DC Installer, and make sure it's the MSI version.
  • Use the Wizard to open the MSI and do this:

    Adobe Wizard Removes Cloud Services

  • Save the MSI and install your new AdobeDC.

Of course, feel free to customize your AdobeDC installer in any other way.

1 Comment

TaskWarrior on Android

TaskWarrior is my tool of choice to manage my list of next actions. I like it because the data is as open as it can be: it is stored as plain-text, there are many different tools to access it and TaskWarrior itself is open source. To access the same data on different devices, an easy solution is, to just copy the TaskWarrior database over to the other devices. Software like OwnCloud, Dropbox or Super Flexible File Synchronizer (this is not a recommendation) can help automate the process. With the configuration variable data.location one can control, which folder TaskWarrior uses to read and write the data and as long as you don't go crazy and execute TaskWarrior faster then you sync, everything works quite well (in case you end up with conflicts you could always use the merge command and hope for the best).

A very important use case, that was not easy to cover with this was my smartphone: My solution always was, to SSH to a server, where TaskWarrior is installed and use it there. But since I seem to be one of very very few people in the world, that would prefer a hardware QWERTY keyboard on their smartphone, there are no decent options, that make SSH user friendly enough to use it on a daily basis (yes, I tried stuff like this but quickly ran out of hands to handle it on the bus).

Do you want to know more?

Comment on this article

Readable Git Annex Unused

So unless you know and use git annex, this is not going to be very useful for you. Check it out, though. It's pretty cool. Unless you are on Windows. In that case it's hell. Anyway, I wrote a script to help me figure out the output of git annex unused. In short, it tells you what those files used to be called before you lost them. Script:

#!/usr/local/bin/python3.5
import re, sys, os
from subprocess import Popen,PIPE
FNULL = open(os.devnull, 'w')

def seeker(s):
  process = Popen(["git", "log", "--stat", "-S", s], stderr=FNULL, stdout=PIPE)
  log = process.stdout.read().decode("utf-8")
  match = re.search(r"(([ -~]*\/)*[ -~]*)\|", log)
  if not match: return ''
  else: return match.group(1).strip()

if len(sys.argv)>1:
  print( seeker(sys.argv[1]) )
else:
  clist = []
  while True:
    crawl = input().strip()
    if not crawl: break
    crawl = crawl.split()
    clist.append(crawl)
  for x in clist:
    print('%s : %s' % ( x[0], seeker(x[1]) ) )

You can either call it with one argument which should be a key, or if you call it with no argument, it expects you to paste the list of results you got from git annex unused into stdin. It then goes through the list and tells you the corresponding filename for each key.

This script is phenomenally stupid in that it does quite a terrible regular expression search on the output of git log and returns the first match it finds. Sue me, it works pretty well at my end.

Comment on this article