Werbung
Apple iPhone 3G S vertragsfrei, ohne Simlock, kostenlose Lieferung, Turicom Online Shop

Compare files in two directories

February 17th, 2008

Sometimes I have two versions of a directory stored on my computer. When cleaning up, it is handy to be able to see which files are in common and which files differ. To do that, I wrote a small Python script that compares two directories. The script also shows duplicate files in each of the directories. MD5 checksums are used to determine if files are equal – no file name comparison is used. Also, the script goes recursively into subdirectories.

Download script (compare.py)

The usage is simple:

Usage: compare.py [-d] dir1 dir2
Compares files in two directories, based on their MD5 checksum.
-d: Debug. Prints the MD5 checksum of every file to stderr.

Sample usage and output:

% python compare.py dir1 dir2
Duplicate files
============================================================

dir1/file 2.pdf
dir1/file.pdf

Common files
============================================================

dir1/image.png
dir2/image.png

dir1/test.pdf
dir2/subdir/foobar.pdf

Files only in dir1
============================================================

dir1/hello.jpg

Files only in dir2
============================================================

dir2/something.jpg
dir2/video.mov

The new SSL error pages in Firefox 3 suck.

November 20th, 2007

Until now, if you had a private website which required a login or collected private data (for example a small online shop), you could create a self-signed certificate or a certificate signed by http://www.cacert.org/ for free. There would be a somewhat confusing error message in all browsers, but that wasn’t a big issue.

Now, let’s see what they did in Firefox 3 (Beta 1):
SSL in Firefox 3

The website will not be displayed and there’s only a small link at the bottom (which most people won’t see). Clicking this unfriendly link requires you to confirm two additional questions and maybe do additional settings. In short, most people won’t be able to access your site at all.

So what are possible consequences of this change for private websites?

  • They will stop using SSL. That’s the easiest way. Who cares about encryption? The user won’t notice anyway.
  • They will use a certificate from http://cert.startcom.org/, which is the only certificate issuer I know which should not display this nasty error message. Unfortunately, if you want wildcards (i.e. make the certificate valid for all your subdomains), you still need to pay for a “Class 2″ certificate (http://www.startssl.com/), and most providers don’t give you enough IP addresses, but that’s another issue. So there’s no free solution for wildcard domains.

What could be done to avoid this problem?

  • In my opinion, encryption and trust should be separated. It is more secure to visit a website which has encryption enabled than any other website without encryption. Ideally, every website would be transferred encrypted. If someone wants trust, i.e. allow people to see that your server is really your server, then he or she could buy a certificate. In the end, you can’t really trust any website (what, if the server has been compromised?), but encryption is always a good thing (your provider or your network administrator can’t read the data).
  • CAcert should be included in mainstream browsers, which unfortunately doesn’t seem to be the case, not even in Firefox.
  • There should be more free certificate issuers. You shouldn’t have to pay for encryption (or trust).

What’s your opinion about this topic?

Another reason why Mac OS X is better than Windows

February 27th, 2007

Here’s a comparison of the “Mouse Precision Error Coefficient” (from Pfeiffer Consulting, lower is better):

Mouse Precision Error Coefficient

You can really feel the difference when working with both systems.

Found via digg.

Django newforms: How to create dynamic forms

February 15th, 2007

Django is a great framework for building web applications. Recently they started to create the newforms library that makes it easy to handle forms.

But the newforms library works only for static forms. Forms that have a fixed number of fields. What I wanted to do, is create a page that allows you to edit multiple instances of a model at once. It should be similar to edit_inline, but there should be a JavaScript link that allows you to add another instance of the object.

That’s why I have written classes that make it possible to handle this type of forms using Django. No AJAX is utilized to make this work.

Read the rest of this entry »

Cool the user with PC coolers

July 7th, 2006

After seeing this picture (cool the user with PC coolers, found via MacOrama) I realized that I also had some unused PC coolers lying around.

Here is what I came up with:

cooler

The cooler is connected to the PC and is standing on the legs of a Netgear WLAN router.

RSS-Reader Widget: Universal Binary and new features

June 23rd, 2006

RSS-Reader

My RSS-Reader Dashboard Widget for Mac OS X is now a Universal Binary and should run on Intel Macs. Because I don’t own an Intel Mac yet, contact me if it does not work correctly.

It also supports automatic reloading of the feed and scrolling using the mouse scroller and keyboard arrows (Thanks to Nicolas Weber or implementing scrolling).

Automatische Ansage des Anrufenden

June 16th, 2006

Bei einem eingehenden Telefonanruf wird bei mir nun Name, Beruf und Ortschaft des Anrufenden automatisch mit einer synthetischen Stimme angesagt. Bei Bedarf wird dies sogar im Telefonbuch über das Internet nachgeschlagen.

Voraussetzung für das Setup sind ein Telefonanschluss bei GGAdigiPhone und natürlich Programmier- und Bastelkenntnisse…

Die Installation und alle benötigten Scripts finden sich in meinem Telefonie-Text.

Vielleicht kann dies ja jemand auf ein Setup mit analogem Telefonanschluss (und Modem im Computer) portieren?

Elevator/Lift hacking

May 10th, 2006

Ich bin auf einen interessanten Blogeintrag über das “Hacken” von Aufzügen gestossen. So soll es beispielsweise Lifte geben, die eine Person ohne Zwischenhalte zu einem bestimmten Stockwerk führen, wenn man den Knopf des Stockwerks und den Tür-Schliess-Knopf gleichzeitig drückt.

Habe diese Tricks noch nicht ausprobiert, vermutlich werden sie in der Schweiz nicht funktionieren.

Hat jemand Erfahrung mit dem “Hacken” von Aufzügen in der Schweiz? :-)

Telefonie bei GGAdigiPhone

April 20th, 2006

Mein Internetprovider (GGA Maur) bietet neu auch Telefonie (GGAdigiPhone) über das Kabelnetz an. Wir haben das Angebot bestellt, unter anderem aus dem Grunde, dass ein Telefon geschenkt wird.

Das Paket ist mit einem Mediatrix 1102 IP-Telefonie-Gerät gekommen, den man zwischen Kabelmodem und PC anschliesst. An diese Box schliesst man dann das eigentliche Telefon per RJ11 an.

Ich habe einen Text geschrieben, der erläutert, wie man die Box auch hinter einem Linux-Server mit NAT zum Laufen bringt.

Disassembling an external LaCie harddrive

April 2nd, 2006

Here are some pictures of disassembling my external “LaCie Porsche Hard Drive” which contained a broken Maxtor disk:

Lacie 1 Lacie 2 Lacie 3

eggdrop.ch blog is powered by WordPress
Entries (RSS) and Comments (RSS).