Recursively md5sum all files in a directory tree

After a server crash a wanted to compare all actual files with the backuped data. An easy way is to compare the md5 hashes like that:

First create recursively md5 hashes from all files in that directory:

find ./backup -type f -print0 | xargs -0 md5sum > /checksums_backup.md5

Then check the actual data:

md5sum -c checksums_backup.md5

I was lucky, no files where damaged.

| Comments (14) »

25-Oct-08


Why does this always happens to me…

…yeah, this thing happened only once, but its a great example:

I heavily use email on my mobile phone. Actually, i’m using ssl for sending emails. Suddenly out of nothing it stopped working. Receiving via imaps wasn’t a problem, but outgoing mail stuck with “unrecognized command”. Yeah, great. Checked configs in my phone, on my server, nothing changed.

Today i read this:

Der Mobilfunkanbieter O2 filterte in seinem UMTS- und GPRS-Netz zeitweise Befehle zur Aktivierung von verschlüsseltem E-Mail-Versand. O2-Pressesprecher Albert Fetsch erklärte, Ursache sei ein Software-Update und ein Hardwaretausch einer Firewall an einem Standort im Core-Netz Anfang September gewesen. Das Problem sei nur punktuell aufgetreten und nun behoben.

Source heise.de

It basically says that German provider O2 filtered some commands for encrypted email, namely STARTTLS.

I recently got the impression that i always stumble upon such things, invest a whole lot of time, get angry, stressed and what not. I hate feeling miserable for other dickheads mistakes.

Apart from that, interesting lapse to make in a softwareupdate.

| Comments (1) »

01-Oct-08


Windows commercials

I recently watched the new Microsoft “Life without walls” spots (have a look at them here) that are directly pointed at Apples “Mac vs. PC” campaign and i must say, i like them. In fact, they are much less arrogant than apples spot.

But if you wanna see some real ads, have a look at this spots with Steve Balmer:

Wether you like him or not, this guy is just crazy and it seems he doesn’t give a shit:

Either his incredible self introduction that will never be topped by anyone else

or his well known call for developers:

and his ads for Windows 1.0 and XP after the click:

Read the complete article »

| Comments (1) »

23-Sep-08



Enabling tooltips on a JTree

Thinks i keep forgetting. Today: Enabling a JTree in J2SE to show different tooltips on his nodes:

1. Create a custom tree renderer like so:

import java.awt.Component;
 
import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
 
public class TooltipTreeRenderer  extends DefaultTreeCellRenderer  {	
  @Override
  public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
    final Component rc = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);		
    String tooltip = "Compute some arbitrary text depending on the node (which is hidden behind 'value')";
    this.setToolTipText(tooltip);
    return rc;
  }
}

2. Set this renderer

aTree.setCellRenderer(new TooltipTreeRenderer());

3. Keep wondering, why the tooltip doesn’t show…

4. Register the tree with the ToolTipManager (which isn’t necessary for nearly all other Swing Components…)

javax.swing.ToolTipManager.sharedInstance().registerComponent(aTree);

5. Enjoy 🙂

| Comments (3) »

12-Aug-08