Basic initial customization of Emacs

How to start making Emacs your own.

I’m a software developer. My most important tool is an editor. For a long time it has been Epsilon by Lugaru Software Ltd. It’s an Emacs clone. I sort-of had to use it because until the late 90s I was working with DOS and Windows.

When I switched to Linux, I used the ‘real’ stuff: Emacs. It’s a very powerful editor that’s easy to extend and customize. You’ll need some time to learn all the relevant commands, but if your editor is the most important tool for you, you better use the best tool that’s available.

Nowadays I use Emacs less than before. The reason for that is the existence of really powerful IDEs like Eclipse (past) and Jetbrains IntelliJ IDEA (present). These tools have better support for the things I need to do as a developer. But nothing beats Emacs when it comes to writing. I especially love its Org-mode (M-x org-mode).

Now, what does M-x org-mode mean? It’s the command for activating Org-mode. M- is the Emacs meta key, Esc or Alt. While I’m at it: C- is Ctrl (used later). So M-x org-mode means: press the Alt key and hold it (if you use the Esc key you can release it), press the x key. At the bottom of the screen you can now enter the text org-mode and press the enter key (often seen as RET in commands).

So you’ve decided to give Emacs a try and have installed it? Good! Now you’ve probably heard that it’s difficult to customize. Most of it’s customization settings are stored in a file and you have to manually edit it? While the first part is true, the second part isn’t. You can – of course – always edit the file yourself, but for many things you don’t have to.

[continue reading…]


Fail2ban is your friend

For over 20 years, I’ve been running public servers on the web. With the exception of the first year, the operating systems of the servers have always been some Linux variants (Linux is 25 years old right now). Currently my server runs Ubuntu 12.04 LTS with Plesk as a server administration software. It’s a basic virtual server hosted by Host Europe.

As soon as I started to look at the log files, I realized that there’s a lot going on that I wouldn’t classify as “intended use” of my server. It’s a little like watching the security camera monitoring the front door of your house and seeing a steady stream of people trying to get in – sometimes by just pressing the door handle, sometimes by trying to run a giant battering ram into it. Some of them seem just confused, nevertheless, their strategies might be successful sometimes: starting at the left edge of the house, they run into the wall, turning around and trying the same one millimeter to the right, until they finally reach the right edge of the house.

Scans log files and bans malicious IPs

A while ago, I decided to do something about it and installed and configured Fail2ban on my server. The areas that I want to protect are logins via SSH, logins for sending and fetching email, FTP, DNS queries, and logins to Plesk and WordPress. There’s never a guaranteed 100% protection, but reducing server load, log file noise, and risk is worth a try.

Use a guide to learn how to harden your Ubuntu 12.04 LTS server, and read this post to learn how to install and do some basic configuration for Fail2ban. The rest of this post explains how I configured Fail2ban on my server.

[continue reading…]


Integrating Tomcat and Apache on Mint Linux

On May 31st, 2014, the Linux distribution Linux Mint 17 (named “Qiana”) Cinnamon has been released. Since I wanted to replace Ubuntu Linux on my Lenovo ThinkPad with something else (but nothing too far away from it), I choose Mint Cinnamon (64-bit). Installation was easy and fast, but then I had to redo the installation of my CMS synformation on that machine (simply because I use it as a development and test machine). Java 1.7 (OpenJDK) was installed already, so I had to install Tomcat, MySQL, and Apache. Here, I’ll only talk about Tomcat and Apache, because I choose to use another way to integrate both: I had used mod_jk before and was looking for an easier way.

[continue reading…]


ForzaDroid for mobile devices

It has been a while since I played Forza Motorsport 3 the last time. Today, I visited the Online Forums there and recognized that with the exception of ForzaTune for the iOS platform and ForzaDroid for Android, there are no other suspension calculators for all the other mobile devices. Some have asked to find out if there’s demand, but nobody has actually implemented one.

Since I don’t have the time nor any motivation to port ForzaDroid to another platform, I will not do it either. But I’ve already implemented ForzaDroid for the Android platform, and everything I need for a web application is there. So I spend a couple of hours and made a web application that’s optimized for smartphones. It should run at least on the following platforms/browsers without a problem: Safari, Android, Symbian/S60, Nokia Series 40, webOS, BlackBerry (3.8+), NetFront, Motorola Internet Browser, Opera Mobile. You need to have JavaScript enabled.

Click on the image to start the ForzaDroid for mobile application:

Screenshot of ForzaDroid for mobile devices

[continue reading…]


Virtual Private Network (VPN) as a safety belt

While my daughter was working on a school project, she was looking for a fully searchable text of “Animal Farm” from George Orwell and found it on the Australian web site Project Gutenberg Australia. The offer was legal, but had she downloaded the text, she would have committed a serious crime, a copyright violation. Two more, and our entire family would be eligible for disconnection from the Internet – at least in some European countries.

A little background: prior to the US-Australian Free Trade Agreement from 2005, copyright in Australia expired 50 years after the authors death. After the FTA was signed in 2005, copyright now expires 70 years after the authors death. That’s how it is in Europe, too.

George Orwell, the author of “Animal Farm”, “Nineteen Eighty-Four”, and four other novels, died January 21st, 1950. So in Australia, his works where in the public domain since 2001. And that didn’t change with the FTA from 2005. While George Orwell’s novels are not in the public domain and are still under copyright in Europe, the opposite is true for Australia. That’s why Australian web sites like Project Gutenberg Australia can legally offer George Orwell’s works for download. George Orwell’s works are also in the public domain in Russia and Canada. In Europe, his works will be in the public domain in 2021, and even later in the US.

[continue reading…]