Set up Fcitx for Chinese and Japanese language input on Ubuntu Xenial 16.04

It was time to update to the latest Ubuntu LTS (Long Term Support) release again recently, and it turned out that setting up Fcitx wasn’t quite as simple this time around. Here is what I had to do to get it to work. [...]

Simple R package for UN Comtrade API

I have recently been doing a lot of work in R, a statistical programming language, and have started accumulating a small collection of functions that I regularly use. One of the tools I have particularly come to rely on is this function to obtain data from the United Nation’s Comtrade database, a great source for country-to-country trade statistics. Since there seemed to be no R package that provides access to their new API (which is still in beta), I simply wrote a function for myself based on the sample code on their homepage and kept it with my personal files. Motivated by posts like this, however, I decided to put the code into an R package and share it here for others to use. [...]

Set up Fcitx for Chinese and Japanese language input on Ubuntu Trusty 14.04

After recently upgrading to Ubuntu 14.04 Trusty Tahr (LTS), I decided to give Fcitx, the default input method framework on Ubuntu’s Chinese sister project Ubuntu Kylin, a try and I was pleasantly surprised. Not only is Fcitx rock-solid and actively developed, it also offers input methods for Japanese, Korean, Vietnamese and a bunch of other languages in addition to the default Chinese input methods. Here is how you get it to run on Ubuntu 14.04. [...]

Finding local extrema in Matlab and Octave via fminbnd()

I recently had to work on a Matlab assignment that required the use of fminbnd() to find local extrema. As I typically work on Octave rather than Matlab I ran into some problems getting my code to work within both programmes. As it turned out, Matlab and Octave handle the function slightly differently, so I thought I’d share my findings to save others some headache. First of all, some background information: fminbnd() is a Matlab/Octave function to find a local minimum of a continuous function within a specified interval … [...]

Block unauthorized OpenVPN logins using fail2ban

Monitoring a server can be a lot of work, but handy tools like fail2ban or logwatch make the task considerably easier. Fail2ban, for one thing, monitors services running on your system and blocks incoming connections from a certain IP addresses (using iptables or hosts.deny) when it detects a break-in attempt. It does so by analysing log files and acting upon suspicious events. These need to be defined using a regex filter, and while a great number of templates are already available for the most-used services, OpenVPN thus far has not been included. Setting this up isn’t too difficult, though … [...]