ASCII animated Star Wars movie

Star wars ASCII movie

To see it, you need a telnet client installed. In Linux and Microsoft Windows previous to Vista a telnet client is built in (obviously Microsoft figured no-one uses telnet anymore in Vista).

To see the movie, just do telnet towel.blinkenlights.nl

In Windows XP, click Start and then Run and type the line above in the run-command window. Then click OK.

Vivotek PT7137 network camera connection problems

Vivotek PT7137I use the Vivotek PT7137 network camera connected through wifi/wlan to my network. Even though it is located only 7 meters from my accesspoint (with a couple of walls in between) the camera lost connection once in a while. And it wouldn’t reconnect unless I rebooted the camera. Upgrading to the latest firmware (v2.6 2009-04-14) didn’t improve either.

At the time my accesspoint was a DLINK DI-624+ broadband router and before I had time to dig into the problem any further, the DLINK passed away permanently and I got myself a Linksys WRT54GL which I pimped with Tomato. Now I had much better control over the wireless environment. I could boost the output on my Linksys to 80 mW (from the original 42) and the wireless survey helped me select a good channel with as little interference with my neighbours as possible. This helped a bit – the loss of connection occured more seldom. But they did still occur.

External WLAN antennaFinally I bought a small external antenna for the Vivotek in my local computer store. It has a 5 dB gain and a magnetic mount so I could move it around without moving the camera. This finally solved my problems and my camera haven’t lost it’s connection in months.

I still haven’t found the reason to the loss of connection. 7 meters should be no problem in a wifi/wlan environment. All other gadgets I connect through the same wireless network works without any problems. Possibly my Vivoteks wireless is broken or something in Vivoteks implementation makes it really sensetive to interference? I don’t know and honestly, I will not spend more time on it unless it causes me a problem again.

PHP htmlspecialchars_decode doesn’t handle nordic/german characters like å, ä and ö

The PHP functions htmlspecialchars and it’s reverse htmlspecialchars_decode only handles the following characters:

  • ‘&’ (ampersand) becomes ‘&’
  • ‘”‘ (double quote) becomes ‘"’ when ENT_NOQUOTES is not set.
  • ”’ (single quote) becomes ‘'’ only when ENT_QUOTES is set.
  • ‘<‘ (less than) becomes ‘&lt;’
  • ‘>’ (greater than) becomes ‘&gt;’

If you want to output html text containing nordic/german characters like Å, Ä, Ö and Ü in dialog boxes (popups) these characters also needs to be converted. The following PHP function does this for you:

function unhtml( $string ) {
$string = str_replace ( '&amp;', '&', $string );
$string = str_replace ( '&#039;', '\'', $string );
$string = str_replace ( '&quot;', '"', $string );
$string = str_replace ( '&lt;', '<', $string );
$string = str_replace ( '&gt;', '>', $string );
$string = str_replace ( '&uuml;', 'ü', $string );
$string = str_replace ( '&Uuml;', 'Ü', $string );
$string = str_replace ( '&auml;', 'ä', $string );
$string = str_replace ( '&Auml;', 'Ä', $string );
$string = str_replace ( '&ouml;', 'ö', $string );
$string = str_replace ( '&Ouml;', 'Ö', $string );
$string = str_replace ( '&aring;', 'å', $string );
$string = str_replace ( '&Aring;', 'Å', $string );
return $string;
}

It is important that the code is saved in UTF-8 encoding (or the format your web page is using). Edit the code in for example Windows notedpad and use Save as. Now you can select UTF-8 encoding when saving the file.

Or if you are using UNIX / Linux you can use iconv to convert the file if it is not already in the correct format. First, to find out the current encoding for your file, use the file command:

$ file --mime-encoding unhtml.php
unhtml.php: iso-8859-1

Now, to convert it to UTF-8 using the iconv command:

iconv -f iso-8859-1 -t utf-8 unhtml.php > unhtml-utf-8.php

The reverse of unhtml is of course the html function:

/* Encodes specific characters for display as html */
function html($string) {
  $string = str_replace ( '&', '&amp;', $string );
  $string = str_replace ( '\'', '&#039;', $string );
  $string = str_replace ( '"', '&quot;', $string );
  $string = str_replace ( '<', '&lt;', $string );
  $string = str_replace ( '>', '&gt;', $string );
  $string = str_replace ( 'ü', '&uuml;', $string );
  $string = str_replace ( 'Ü', '&Uuml;', $string );
  $string = str_replace ( 'ä', '&auml;', $string );
  $string = str_replace ( 'Ä', '&Auml;', $string );
  $string = str_replace ( 'ö', '&ouml;', $string );
  $string = str_replace ( 'Ö', '&Ouml;', $string );
  $string = str_replace ( 'å', '&aring;', $string );
  $string = str_replace ( 'Å', '&Aring;', $string );
  return $string;
}
?>

TYPO3 cms installation fails in step 2

If you are installing the TYPO3 content management system (CMS), after uploading the files to your web server and setting some directory permissions, you are supposed to point your browser to your web server’s root where you just have installed TYPO3 in order to continue the installation. A screen similar to this is displayed:

TYPO3 installation step 1

Click to enlarge

Enter database username, password and server (normally “localhost”) and click continue. If the following screen (as step 2) is displayed, you are in trouble:

TYPO3 installation step 2

Click to enlarge

This screen is supposed to show you the availible databases for selection. But as you can see it ends just below the word “Database”. No error message is displayed.

The reason for this is that PHP is running in Safe mode. By configuring your webserver/PHP to run with Safe mode off the installation will work.

This situation is actually described in the TYPO3 Wiki under troubleshooting saying “This could cause the Install Tool to display an error message”. In my case it didn’t and it took some time of head scratching to figure it out.

How to find out what Ubuntu version a system is running

There are two ways:

# cat /etc/issue
Ubuntu 9.10 \n \l

or

# lsb_release -a
Distributor ID:    Ubuntu
Description:    Ubuntu 9.10
Release:    9.10
Codename:    karmic

The latter is slower but gives more information.

Google streets – now in Sweden and Denmark

Until recently Google streets has not been availible for Sweden and Denmark. There has been local sites with a similar function, like http://hitta.se/gatubild. But now you can also use Google streets for your virtual tour to Sweden and Denmark. Not only the large cities but also smaller villages and country roads can be seen in Google streets.

To use Google streets go to maps.google.com, find your place of interest, click and hold the little orange man that stands just above the zoom handle and put him down on the street you want to visit. Streets with photos will get blue borders when you lift the little man and you can of course only put him down on such streets.

Read more

Minolta Dimage Scan Dual III AF-2840 in Windows Vista

So, did you also try to get this negitive/slide scanner to work in Windows Vista?  No success? Thought so. Unfortunately I have found that Minolta scanners seems to have kind of a short life cycle in the eyes of the manufacturer. Like many other computer accessories that are not professional grade, drivers are availible for the current operating systems but when new arrives there just isn’t being any drivers developed. For this scanner I believe it was Windows 2000 and possibly Windows XP it had drivers for. But the arrival of Windows Vista was the death for this otherwise perfectly good scanner.

Minolta Dimage Scan Dual III AF-2840Like cameras, a good scanner do have a longer life cycle than normal computer accessories, which means that updated drivers are needed. Hopefully manufacturers will pick that up. Even though this scanner is not a professional grade scanner it has good performance and when sold it was not cheap, more in the price class of a good camera. I think as a consumer you should expect a bit longer life than that. Enough complaining.

Read more