Archive for the ‘Misc’ Category.

Acer accepting Windows tax refund

Getting a laptop without Windows is really problematic. How about getting a refund for a Windows system you’re not going to use? I tried asking Acer, and it’s no easy task (it’s technically possible, but will cost you more than a refund you get).

Continue reading ‘Acer accepting Windows tax refund’ »

Testing RAM on a server without rebooting to run memtest86+

Sometimes, applications on your server crash in mysterious ways, or your server hangs without any apparent reason. You suspect that the RAM may be broken, so memtest86+would be ideal tool to check RAM – however, there are some problems involved with it:

  • running memtest86+ means server downtime,
  • it may not be possible to run memtest86+ on a remote server without KVM-IP, iLO or similar access.

What to do in such situations? User-space memtester to the rescue!

Continue reading ‘Testing RAM on a server without rebooting to run memtest86+’ »

Getting IP address and aliases in Perl

This piece of Perl code should get you IP address for eth0 into $ip variable:

my $ip;
my $device = "eth0";
if ((`/sbin/ifconfig $device`) =~ /inet addr:(\d+\.\d+\.\d+\.\d+)/) {
    $ip = $1;
}

If you’d also like to get a list of all aliases the device has, you could use something like:
Continue reading ‘Getting IP address and aliases in Perl’ »

A quick setting up SVN repository for your website

Scripting qemu / kvm monitor

There are some tasks in qemu / kvm monitor which could be scripted (i.e. like changing VNC password on demand).

Here is how.

Continue reading ‘Scripting qemu / kvm monitor’ »

md0 : active (auto-read-only) in /proc/mdadm

Ever seen this message in your /proc/mdstat right after you boot the server and wondered what it is?

Continue reading ‘md0 : active (auto-read-only) in /proc/mdadm’ »

MySQL replication: adding a new database

Sometimes, you will see MySQL setups where only one database is being replicated. How to add a second database, so that it’s also replicated?

Continue reading ‘MySQL replication: adding a new database’ »

CentOS – update / install PHP 5.2

CentOS 5.x comes with PHP 5.1, which is too old for some applications.

Here is a quickie on how to update it using CentOS development / testing repository.
Continue reading ‘CentOS – update / install PHP 5.2’ »

Setting up DKIMproxy with Exim for DKIM and DomainKeys signing

Was your mail ever rejected or tagged as spam because it didn’t have a DKIM signature? You could enable DKIM-signing in Exim, but then, some older mail systems may still use DomainKeys.

Currently, Exim does not support signing mails with both DomainKeys and DKIM. You have to pick one of them, unless you do some tricks with patching Exim or connecting back to itself.

Still though, such setup is not perfect: Exim does not wrap its DomainKeys signature, which may result in SpamAssassin installations tagging your mail with HEAD_LONG rule (“Message headers are very long”) and assigning it 2.5 spam points.

So how to sign mail with DKIM and DomainKeys without negative consequences of being tagged by SpamAssassin for very long headers? DKIMproxy to the rescue!

Exim configuration

Continue reading ‘Setting up DKIMproxy with Exim for DKIM and DomainKeys signing’ »

Linux and Lumix digital cameras

Do you happen to be running a Linux distribution and have Panasonic Lumix digital camera?

If yes, you may have problems downloading photos from it – depending on your kernel and udev settings, or more generally, on Linux distribution used.

The tips from below may help you.

Continue reading ‘Linux and Lumix digital cameras’ »