## Denied Permissions: copying text

Obviously, my Bank does not provide a REST API to download the transactions happening on my accounts. After I asked for "machine parseable" data, they told me that I can download CSV files. Awesome! So I wrote a parser and lived happily ever after. Except that they change their CSV format without notice every few months and at some point they started to mix different encodings in the same file. So I lived unhapply, regularly fixing the script reading the CSV file. What did not change for around 10 years now are their banking statements. And this also holds for the PDFs you have to download, if you want to avoid getting them via snail mail (and paying for the postage of course). I decided to parse the PDFs instead and this went pretty well for may years... up to recently, when something changed (it may have been a software update of the parser I use or something on their side). Do you want to know more?

## blag update

We have updated the layout, also the posts are now markdown-rendered on the client side. Oh, and we switched to [$\KaTeX$](https://khan.github.io/KaTeX/) for math rendering. Since this breaks compatibility with the old hairball of plugins we had, it will take some time before all the old entries are fixed, but we are working on it.

## Keep Your Screen On With Python

My Windows desktop computer is set to turn the screen off after one minute of inactivity. It's usually a good idea. Except when I am reading something on screen. Then it is terribly annoying. Most media players can prevent Windows from turning off the screen by calling [SetThreadExecutionState](https://msdn.microsoft.com/en-us/library/aa373208(VS.85).aspx). Well. So can I:
import ctypes
input('screen stays on. press any key to exit.')

Pretty neat, huh? Python really can do all things.

## Snort on Raspberry Pi behind FritzBox!

I finally decided to set up a real router in front of my router. The main use cases, I wanted to cover were the following: * nice local domain names: Since I run a FritzBox (which is a pretty common plastic router in Germany), all local host names (sometimes!) get suffixed by .fritz.box. This domain cannot be configured to .something.awesome and the whole setup is quite in-transparent, that I could not figure out, in which cases, the suffix is mandatory when resolving host names. * play around with [snort](https://www.snort.org/). * bandwidth monitoring: to replace the current workflow of randomly killing machines, when the internet connection is slow and one needs bandwidth to do something important™. In this blog post I will cover nothing of this. Instead, I'll explain, how I set up a RaspberryPi to enable me to do all the above in the future. Do you want to know more?

## VPN in der Deutschen Bahn

Es [gibt einige Probleme, im WiFi der Deutschen Bahn im ICE ein VPN zu verwenden](https://community.bahn.de/questions/1197692-nutzung-wifionice-ssl-vpn), und das ist natürlich ein Problem, weil es sich dabei um ein offenes und unverschlüsseltes Netz handelt. Die Bahn erklärt das Problem dadurch, dass Mobilfunk aktuell nur Pakete durch lässt, die maximal 1500 Byte groß sind. Da noch Platz für deren Header bleiben muss, sollte man die MTU auf 1440 setzen. Unter Windows macht man das wie folgt: Click!

## Code Rust in Windows

I have started to [learn](http://rustbyexample.com/) [rust](http://rust-lang.org), and I am enjoying myself. This is a merge and update on the two fantastic blog posts on [how to setup Visual Studio Code for Rust](https://mobiarch.wordpress.com/2015/06/16/rust-using-visual-studio-code/) and [how to enable debugging](https://sherryummen.in/2016/09/02/debugging-rust-on-windows-using-visual-studio-code/). In my personal opinion, from among [all the available IDE solutions for rust](https://areweideyet.com/), this is the best. Do you want to know more?

## 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 [back]

## Zabbix 3.0 agent on FreeBSD

As you may have noticed: the folk at this blog recently started to play around with FreeBSD (mainly as FreeNAS jails). And since I recently started to <3 Zabbix. Here is an explanation on how to compile and use the agent on such a jail. Do you want to know more?

## 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?

## 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. [back]

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](https://forums.adobe.com/thread/1811609). 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](http://www.adobe.com/devnet-docs/acrobatetk/tools/Wizard/), most likely [the version for Adobe DC](http://www.adobe.com/devnet-docs/acrobatetk/tools/Wizard/WizardDC/basics.html). * Put on your robe and your wizard hat. * Get yourself your preferred [Adobe DC Installer](ftp://ftp.adobe.com/pub/adobe/reader/win/AcrobatDC/1500720033/), and **make sure it's the MSI version**. * Use the Wizard to open the MSI and do this: [![Adobe Wizard Removes Cloud Services](/wp-content/uploads/2016/09/wizard-300x213.png)](/wp-content/uploads/2016/09/wizard.png) * Save the MSI and install your new AdobeDC. Of course, feel free to customize your AdobeDC installer in any other way.

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?

So unless you know and use [git annex](https://git-annex.branchable.com/), 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](http://manpages.ubuntu.com/manpages/wily/man1/git-annex-unused.1.html). 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)
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.