Posts

2024

  • Link Obfuscation for Email and Phone Numbers in Astrojs

    Spiders and automated programs often scan websites for email addresses and phone numbers to harvest for spam campaigns. Obfuscation scrambles the data, making it unreadable to these bots and significantly reducing the chances of receiving unwanted emails or calls. While obfuscation protects your information to some extend, it doesn’t prevent users from contacting you. The idea behind the implementation proposed in this article is to Base64-encode the sensitive data and reverse the characters.

  • Cursor-based Pagination on Multiple Fields with MongoDB

    Cursor-based pagination can offer great performance on large datasets when an index can be used efficiently. With a single field, as cursor and sort criteria, the implementation is straight forward. Tutorials can be found all over the internet. But with multiple cursor fields, the filter criteria and sort order is not as simple, especially if an index is to be used for optimal performance.

  • Reusable Test Data with Object Mother and Builder Pattern in Java

    From my observation, code bases with a high test coverage and a certain level of complexity tend to have cluttered and messy tests. Such tests are often dominated by the preparation step in order to prepare test data or bring the system into a state required for the test. The actual test code, such as invocation of the component-under-test and verification of the results, can easily be buried under the preparation step. To ease such problems and to improve readability and maintainability of test code in general, I like to combine the Builder pattern with the Object Mother pattern and randomized test data.

2023

  • Use OLED Display of ESP8266 NodeMCU with U8g2 library

    The ESP8266 board with an attached 0.96 inch OLED display is a great deal. I bought is for about 6 Euros. The full title of my offering was “NodeMCU ESP8266 Development Board w/0.96” OLED Display CH340 Driver Module USB-C". Unfortunately. the description in the offering is incorrect and the OLED display does not work as expected when using the code/values given in the description.

  • Webdriver: Invalid element state

    While using the WebdriverIO browser automation test framework based on the Webdriver protocol, I got stuck with this error: invalid element state: invalid element state. The error occurred when interacting with an input element. Since this error message is not very descriptive, I want to point to the solution for my situation.

  • Angular: Interceptors from NgModules with standalone App

    In the long run, standalone components in Angular are expected to replace NgModules. However, it’s important to note that not all libraries and modules have made the transition yet. Many still provide only classic NgModules. Fortunately, the Angular team has done an excellent job ensuring that both approaches can work seamlessly together.

  • Howto: Setup Polyfills in Angular

    Angular CLI based projects support polyfills. Here are the steps required to set them up on a newly created project which does not contain them so far:

2022

2020

  • Fixing missing Application in Catalina's Privacy Protection settings

    Slack and Microsoft Teams did not show up in Catalina’s Privacy Protection settings, thus, I could not grant permission to capture the screen. I could solve the problem for both applications by completely removing the application and resetting Catalina’s internal settings.

  • Postfix: Fixing SASL authentication failure

    On a freshly installed CentOS 8.2, Postfix faced a SASL authentication issue when trying to authenticate against a SMTP mail server. The connection could be established, but Postfix did not find a matching authentication mechanism.

  • Domain Driven Design - Glossary

    Collection of relevant terms and keywords about Domain Driven Design.

  • Replacing a Battery with a Solar Panel and a Super-Capacitor

    CR2032 batteries usually power devices with very low energy requirements. A typical use-case for such a battery is, keeping an internal clock active even if the main power supply is not available. The device will be able to maintain the correct date and time even when turned off and not connected to any other power source. An example device that makes use of this is a common mainboard - an essential part of every computer.

  • Plant Monitoring with Xiaomi Mi Flora and a Raspberry Pi

    In this article, I am going to describe my motivation for building an automated plant monitoring and I will explain my final system and results in detail.

2019

2013