Say you want to write a C program, but you want to avoid including plain strings within the binary. This is something often done by malware authors, for example, to avoid easy extraction of so called indicators of compromise. I can also imagine a legitimate business that uses string obfuscation to make reverse engineering of their software harder to protect their intellectual property.
This is often called string obfuscation.
I want to use this knowledge to make the world a better place!
a.k.a. "My Bank does not support CSVs".
When I asked my bank for "machine readable" versions of my bank statements, they where like:
Their website has a CSV-export function. But only data from the last three months can be exported. Of course, it would have been smart to have performed this export every two months or so, but let's talk about something else.
Sure!

I started to play around with ArangoDB and used Python to get some data into my first database. Long story short: if you want to set your own key for the documents, do it on the document, not on the initialization data.
EDIT: this is only true for the most recent version 1.3.1 release on pypi by the time of writing ((See conversation on github for details)).
Read the longer story!
This post will be probably be very boring for everyone who doesn't have this problem. But since it cost me some time to figure out a solution, I think it is worth sharing.
I care. You share. Read on!
In an attempt to piggyback on the people's vague fear of random lawsuits in Germany, I'll blog on how to remove the last octet of an IP in NGINX log files.
Do you want to know more or get sued?
Recently I once again stumbled upon a detail of the HTTP specification involving the POST verb and "enforced" https. I'll document it here in an attempt to save other people the time (hopefully also future-me).
Do you want to know more?
Flask pretty-prints response generated by the
flask.json.jsonify
function. Avoiding this on a per request basis doesn't seem to be intended: There is a configuration variable for the whole application: JSONIFY_PRETTYPRINT_REGULAR
. But setting that to False
minifies every JSON responses. And, in general, I enjoyed the pretty printed output. So implementing X-PrettyPrint
- which seems to be a quasi-standard - also sounded like a the wrong way because it means replacing the call to jsonify
by a custom implementation. This short story has a happy end though: Flask does not pretty-print the response if it receives an AJAX request. So one can just send the appropriate header:
curl -H 'X-Requested-With: XMLHttpRequest' "https://exmaple.com/api/endpoint.json";
I am not very disciplined. So trying not to be distracted while working at my computer is a major project for me. Since "deep work" is en vogue, it is possible to disable notifications in nearly every app nowadays. But there are often tiny bits one cannot change: Slack's icon in the notification area is one of those things: Whenever you have an unread message in any of the channels you are part of, Slack will show a small blue dot on its icon in the notification area. One can argue that it is not that hard to ignore that but fishing is also not that hard and I cannot do it. What I can do though is overwrite
slack-taskbar-unread.png
by slack-taskbar-rest.png
in %APPDATA%\Local\slack\app-VERSION\resources\app.asar.unpacked\src\static\
.
Spoiler: My main point in this post is not given away by the title.
But first things first: What are all those words?
Would you like to know more?
This blag post describes how to use a [Raspberry Pi](http://amzn.to/2wjICvo) to remotely "press" and potentially "hold" the power button on a PC. This is my first non-trivial (still pretty-trivial) hardware-related project. So don't expect anything too fancy.
Would you like to know more?
I like to have all "stuff that I need to do something with" collected at one place. For the virtual world, this place is my email inbox. To remind me of things, I send myself an email and can be sure that I'll process it at a later point in time for example. Having another place with the result of RSS feeds always annoyed me a bit. As soon as I realized that I find this annoying, a solution was easy to implement of course:
aptitude install rss2email
r2e new your@email.address
r2e add blag https://blag.nullteilerfrei.de/feed/
and a cronjob, executed every few minutes:
*/10 * * * * r2e run
will lead to all our fine blag posts ending up as email notifications.
Github has a history of not giving a frack what their users want ((https://github.com/dear-github/dear-github)) ((https://github.com/isaacs/github/issues)). For example, a few developer friends of mine were reluctant to click any links in their notifications-page, since after they clicked the link, the notification was marked as read and you might lose track of it, if you just close the browser tab ((on a side note, tellmewhenitcloses.com is pretty handy to avoid too many notifications in the first place)).
So David Badura ((https://github.com/DavidBadura)) and I decided to fix this problem by writing a browser extension. The result can be found on Github: https://github.com/larsborn/GithubToDos. After installation (also possible in Opera btw, the best browser there is), the extension injects an "Add ToDo" button on every issue page and pull request. When clicking, it, the URL gets saved to the local storage of the browser ((Using local storage is handy for people that are not very concerned about privacy and just use the cloud synchronization feature of their browser: the content of their ToDo list will then also just be synced to all their devices.)). The list of all URLs added like this can then be access through a new button in the header toolbar of github.
You can clone the project from github and add it as an "Unpacked extension" or just head to the Github ToDos on the Chrome Store and just install it from there. Pull requests are welcome, open an issue, if you find a bug, open source yadayada.

I wanted to crop out a specific rectangle in a few dozen scanned documents with ImageMagick like this:
convert -crop 1600x1880+100+420 image.nrm.png cropped.png
Scanning often results in a tiny skew, which would lead to a slightly different rectangle location on every image. It seems that a common preprocessing step when doing OCR is to automatically correct this skew. The Python toolset ocropy ((https://github.com/tmbdev/ocropy)) for example contains a tool to do this: ./ocropus-nlbin image.jpg
creates the file image.nrm.png
which is optimized for OTR and has corrected skew.