Restore, Clone or Backup your Homebrew Setup

Homebrew is a popular package manager for MacOS. It provides easy access to thousands of programs and applications. It is developed and maintained by an open-source community on Github. Use Homebrew bundle to backup and restore your Homebrew configuration. 

If you haven’t installed it yet, go take a look quick on brew.sh or just install it by running the following command in the MacOS terminal.

The installation should succeed without problems. Installing some nice tools is also easy:

To install a better alternative to the standard process viewer top.

Continue reading Restore, Clone or Backup your Homebrew Setup

Fix Magento 1.9.3 ‘Notice: Undefined index: session_expire_timestamp in … on line 461’

Some days ago the Magento security update SUPEE-8788 was released. This update fixes a number of critical vulnerabilities. To fix an existing shop one could either apply the SUPEE-patch or upgrade the shop to Magento 1.9.3. However, after updating I experienced a little issue when trying to reach the shop again. 

A PHP Exception popped up:

Even after flushing the cache this problem appears. The undefined index and path of the file that raises the exception gives away that this problem might have to with Magento’s session handling. I started with deleting any existing session cookies in my browser. This made the error message disappear. Be aware that this is not an appropriate solution to this error!

Continue reading Fix Magento 1.9.3 ‘Notice: Undefined index: session_expire_timestamp in … on line 461’

Implementing a MATLAB digital filter or controllers in C++

Controllers and filters are often a good way to stabilise a system, condition a signal or make a system follow a reference. The usual approach is to model the system or signal in an application like MATLAB and then design a filter or controller. Either by applying design rules, some sort of optimisation algorithm or tuning parameters experimentally. When the design is finished the controller or filter is not ready for use yet. It is still necessary to realise it in practice. This is often done digitally on a micro controller or real-time computer. This article will describe a effective, open and fast approach to realising a filter or controller in C++.

Step responses of Butterworth Low-pass Filters
Step responses of Butterworth Low-pass digital filters with different cut-off frequencies

Continue reading Implementing a MATLAB digital filter or controllers in C++

Update Rooted Nexus 6P to Android 7.0 Nougat with FlashFire

Android 7.0 is out! I’m really wondering about the split view mode and the new notification. I wanted to upgrade my Nexus 6P as soon as possible. The update was not available as an OTA for my phone yet so I had to take a simple measure to make it available. Furthermore my phone is rooted so I had to use a flash tool or the adb/fastboot tools to upgrade. First, we will enable the update. Then we download it. Next we use FlashFire to flash the firmware to the device (dangerous). Finally we will hopefully try to boot into the newest Android version.

The steps below will most certainly work for all recent Nexus devices like the Nexus 6 and Nexus 5X. The older Nexus 5 is not supported officially so it will depend solely on community effort.

Continue reading Update Rooted Nexus 6P to Android 7.0 Nougat with FlashFire

Running JIRA Software securely behind Apache with ISPConfig 3.1

If you use both JIRA and ISPConfig on a server you might want to set-up a reverse proxy to serve the JIRA frontend securely on the standard HTTPS port just like other websites in your ISPConfig setup. ISPConfig uses Apache to serve websites whereas JIRA has its own web-server (Tomcat). It is not straight-forward to share a single port such as the HTTPS port 443 between two applications. The Apache Reverse-Proxy feature allows us to do so however.

Secure JIRA using Apache Reverse-Proxy
Secure JIRA using Apache Reverse-Proxy

Advantages of using a reverse-proxy instead of serving JIRA on a different port are as follows:

  • Single entry-point for all web traffic
  • Access- and certificate management in one place (Apache via ISPConfig)
  • Only one or two (HTTP/HTTPS) ports need to be opened to the public
  • No need to specify the port when navigating to the JIRA instance
  • Allows traffic and statistics monitoring through Apache

Continue reading Running JIRA Software securely behind Apache with ISPConfig 3.1

Random Midpoint Displacement Fractal (RMDF)

The Random Midpoint Displacement Fractal (RMDF) is a fractal this is often used for generating height-maps, landscapes, rough surfaces and more. Its implementation is simple but the results are interesting, especially when a nice color-map is applied to the matrix and it is shown as a 3D-surface.

Example of a Random Midpoint Displacement Fractal

Continue reading Random Midpoint Displacement Fractal (RMDF)

Free SSL certificates: use Let’s Encrypt with ISPConfig 3

View of the Chrome Certificate info pane for tomlankhorst.nlAs you might have noticed this site uses HTTPS. Obtaining SSL certificates was always a bit of a hassle. Finding a certificate authority, doing regular payment, renewals and installing the certificate on your server. Let’s Encrypt is an initiative to provide a better way of enabling encryption on websites. It is open, automated and above all: it offers free SSL certificates. Learn to use Let’s Encrypt on an ISPConfig 3.0 server.

I assume you already have an ISPConfig server up and running. You might have a number of sites that use plain HTTP of HTTPS that you want to secure with free SSL certificates. That’s good, we’re going to do the following:

  1. Obtaining certbot
  2. Requesting free SSL certificates
  3. Configuring SSL in ISPConfig
  4. Enabling automatic periodical renewal

Continue reading Free SSL certificates: use Let’s Encrypt with ISPConfig 3

Matlab2Tikz: Perfect MATLAB Figures in LaTeX

MATLAB exported TikZ picture with custom stylingPapers and reports can’t do without both but integrating MATLAB figures in LaTeX is not so obvious. Different methods for exporting and including graphics exist but have various downsides like inconsistent scaling, wrong fonts and strange spacing. The best method I have come across so far is using matlab2tikz. It is a MATLAB script that is able to extract all relevant details out of a figure and convert it to PGFPlots (a LaTeX package).

Continue reading Matlab2Tikz: Perfect MATLAB Figures in LaTeX