CleanTalk anti-spam service

I have been running a large MediaWiki powered website for over three years now. In my opinion, the most important aspect about a wiki is that everyone can contribute with ease. That’s why when I set up the website, I wanted to make sure that anonymous users could contribute. This worked great for roughly a year, with an occasional spam message and some vandalism, but nothing that couldn’t be managed. I found that it was possible to keep the spam at bay with some basic tweaks ad plugins for MediaWiki. This system worked great until again roughly a year later. Suddenly a massive amount of SEO bots were flooding the website, posting an unmanageable amount of spam. It was very hard to find a good solution for this problem, even a commercial one, as MediaWiki isn’t that broadly supported, not like WordPress or Drupal for example. I ended up stumbling upon CleanTalk.

Read More

Microsoft Support

You often read about companies messing up with customer support, so I figured I’d write a short article to praise Microsoft for my great support experience.

Last year I purchased a Microsoft Surface Pro 3 tablet. Some minor performance issue aside, I have really enjoyed using the device. Unfortunately a while back I noticed that the tip of my Surface Pen started to bend a bit and I noticed it has a small crack, which fairly rapidly expanded as I used the pen. The pen included with the Surface Pro 3 doe not have replaceable tips, so I got a bit worried. After searching online, I found a new tip for roughly 8.50 EUR (or let’s say about 10 USD) on AliExpress, which I personally thought was a bit too expensive for a tiny piece of plastic.

This did indicate to me that it should be possible to replace the tip. A lot of Q/A sites suggested taking the pen apart using tools and brute force to remove the tip, but not wanting to damage the expensive tool, I figured out that you can easily remove the tip by using some tweezers to just pull it out. It goes fairly deep into the pen to reach the pressure sensor.

Read More

Cannot open your terminal ‘/dev/pts/0’

I ran into the error Cannot open your terminal '/dev/pts/0'. Though I had not seen this before, it seems to occur when you use the “switch user (su)” command to access a user account and then try to open a screen.

The issue can be resolved by either logging in directly with the user account you want to use, or by running the command “script /dev/null” as demonstrated here on StackOverflow.

Read More

NoIP Dynamic Update Client on RaspberryPi (or Ubuntu)

Personally I like to use NoIP’s dynamic DNS services. This tutorial explains how to install the NoIP DUC on a RaspberryPi running a Raspbian based distribution, but it will work on Ubuntu or any other Debian based distribution as well. You should execute all of the commands below as superuser. As not to have to put sudo in front of all of them, it’s best to log in as root or switch to root with sudo su.

Step 1: Install prerequisites

You will need some software to install and run the DUC software. Execute the following commands:

apt-get update
apt-get install build-essential python-setuptools
easy_install killproc

Step 2: Download and install the DUC software

Next you will have to download and install the DUC software itself. The software has to be built from source code, which is why we installed build-essential. The following commands will download and install the software:

cd /usr/local/src/
rm -r noip-*
tar xf noip-duc-linux.tar.gz
rm noip-duc-linux.tar.gz
cd noip-*
make install

The commands above will first remove any previous source downloads for NoIP you might have had. Next it downloads the sources for the software and installs it. After installing it should immediately start the configuration wizard, which you can always restart using the command “/usr/local/bin/noip2 -C“. The configuration wizard will ask for your NoIP account details, as well as the host you want to be using. This should be mostly straight-forward. When it asks if you want to run anything on an update, you should probably just enter “No”.

Step 3: Running the DUC software on startup

By default, the DUC software will not start when you reboot your system. This is where killproc comes in, which we installed earlier. What we have to do now is set up an init script. We’re going to be using a simple script, as is described in the software’s readme file, with a slight alteration to make it work on our distribution. I have the script uploaded on my webserver, so you can just download it to your drive. Execute the following commands to install it and set it up:

cd /etc/init.d
chmod +x noip2
update-rc.d noip2 defaults

Step 4: Reboot

You’re all done now, so you can reboot the system now and when it boots up, the NoIP DUC software should be running.


Read More

Logitech MX Master scrolling issue

Since shortly after its initial release, I have used the Logitech Anywhere MX mouse for my desktop pc. I’m a huge fan of Logitech hardware, they have yet to disappoint me after years and years of products. If I couldn’t get Logitech input hardware, I would go with Microsoft, but that’s another story. So a week or two back, my Anywhere MX finally gave out, after years of loyal service. I’m not sure if it was just wear and tear from age, did I mash it too hard (after years of use tha bettery sometimes made bad contact inside, so I often gave it a tap on my desk with the back to lodge it back into place), … But the left button didn’t function quite as well anymore all of a sudden. I had to press it fairly hard or it would magically double-click or not click at all.

Time for a replacement! My philosophy when it comes to hardware, don’t cheap out. Good hardware will last years, it’s worth the price tag. So I go to the Logitech website and start hunting. Eventually I decide to get the MX Master. This is Logitech’s follow-up on the Anywhere MX’ bigger brother, the Performance MX. After I got it, I just fell completely in love. It took some getting used to the large desktop form factor, as I usually go with portable mice, but the functionality is simply amazing. After years of Anywhere Mx, I also couldn’t live without the hyper scroll system that allows you to scroll insanely fast and this has also been greatly improved.

Now this isn’t a product review, but actually a “quick fix” for an issue I bumped into. I play some FPS games every now and then and this is where I first noticed the issue. Sometimes when I scrolled to switch guns, the game would just keep swapping multiple times, as if I’d scrolled more than a single tick. Later when resizing my browser contents I noticed the same issue. Every time I tried to resize by using the Ctrl + Scroll combination, it resized twice, as if I had scrolled two ticks. This was extremely frustrating.

Today I decided to finally mess around with the settings of the device, to try and fix this. I found a solution. Simpl;y open the Logitech Options software, hit the “Point and scroll” tab and then disable the “Smooth scrolling” feature. You will still get the hyper scrolling (freespin mode) functionality, but you will scroll with single scrolling ticks in “rachet mode” now.

Read More

Surface Pro 3, a headache and an addiction

So about one and a half year ago I wrote up my thoughts on tablet devices. This was the general idea:

Tablets are bulky smartphones with large screens to play low-end games on.

My point being that tablets are not devices for productivity. The market has changed a lot since I wrote up that post, but it has also changed very little. A lot, if not most tablets are still bulky smartphones. But they have improved in regards to productivity.

Read More

IntelliJ IDEA 14.1 HiDPI issues

I’m a user and big fan of JetBrains’ IntelliJ IDEA IDE. Having tried and used several Java IDEs in the past, I personally think it’s the best out there. On top of that, every major update bring a couple of new amazing features.

Yesterday the 14.1 update of the IDE was released. As usual I rushed to download and install the new version, after a quick glance of the release notes. But as a first, I ran into a major issue.

I’m usually use my desktop or my laptop for programming, but a while ago I got myself a Microsoft Surface Pro 3, to corry around more easily. I also use this for programming. The Surface Pro 3 has a very high-resolution display, which makes whatever is displayed look nice and crisp. But if you use the native resolution, everything will also be very tiny. Microsoft has solved this issue by having Windows do DPI scaling of applications. This essentially simply scales them up to make everything readable to the user. Some applications support this and those that do provide a very nice upscaled crisp interface.

Up until now, IntelliJ has not supported high DPI displays, and as a result, the native OS would just scale it up, making text look slightly blurry, as well as other elements in the UI. To resolve this JetBrains has worked on adding support for these displays on all platforms into their IDE. This is where it got messy.

After installing the new version, and running it, I quickly noticed that there was something wrong. My code looked very crisp for sure, but it was incredibly tiny. Also icons on the toolbar had been shrunk down to a small size. To find the answer, I had to dig through some of JetBrains’ bugtracker issues and found a fix for the problem.

The problem is that (for some reason) the IDE does not detect that I’m running a high-DPI display. So solve this, you have to force it into the HiDPI mode. You can do this by editing the vmoptions files for the IDE, which are located in the same folder that holds the IDE’s binary files. For example “C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1\bin” on Windows 8.1 x64. Add the argument -Dhidpi=true to the end file. Be warned though, there are vmoptions files for both 32-bit and 64-bit, make sure you change the right one, or change both to be sure.

It’s clear that there’s still a few issues for JetBrains to work out, even in HiDPI mode, the text in the tip of the day window is pretty small, but they are well on their way towards properly supporting these displays.

Read More

Tar (+GZip) individual (sql) files in a folder

I had been backing up a MySQL database with a simple shell script for a while now. What I somehow forgot to add to the script was a command to compress the SQL dumps before uploading them to my backup server. The script had been running for a few months, so manually compressing each file wasn’t much of an option. So I wrote this little shell script do the work for me.

The script places all of the sql files individually into a tar archive with GZip compression. The new file uses the old file’s name with “.tar.gz” appended at the end. The old file is deleted after the compressed archive has been created.

You can of course do this for other files, just change the *.sql mask to work with different files. If for some reason you just want TAR files without the GZip compression, replace the tar line in the script with “tar cvf "${file}".tar "${file}"“.

Read More

Check available diskspace on Ubuntu (CLI)

If you are running an Ubuntu (or other linux) commandline interface, you might have to check how much diskspace is available on the system. You can easily have the system output a list of the disk space usage on all mounted filesystems with the command df -h.

The output depends completely on how your system is set up, but it will look something like:

Read More