informative

Panzer general 2 on Ubuntu Hardy with Wine

Here is a list of things I had to do to try to get Panzer general 2 working with wine 0.9.59 on Ubuntu Hardy. However, in the end I could not get it to work and was told that this game has the same problems on Windows XP.

My last hope is to install Windows 98/95 in a virtual machine, but I think I might just have to mark this game as a victim of time.

If you find a solution or have anything else to add, feel free to comment on this post.

Removing windows Vista and other metallic stickers from your laptop

On most laptops you will find nice metallic stickers with the most useless information, like: "You have a processor" and "You bought this machine with a Microsoft operating system".

To get rid of these shameful stickers seems pretty hard: you can't seem to just peel them of because they are to rigid and you don't want to use any kind of chemical because, well, it's your new laptop. The solution is very easy though, but I still just wanted to post it before people start using knives or chemicals.

Remove 30 day old files from you GNOME trash


Currently this is outdated and will not work! See http://log.logfish.net/node/43

Removing 30 day old files from you gnome trash can be done with the following magic line:

find ~/.local/share/Trash/files/ -type f -mtime +30 -printf '%P\000'  |xargs -n1 -I {} -0 gvfs-rm trash:///_{}

Now, what if you want to do this every day? Simple: add a crontab entry to do it all: run crontab -e and insert the following:

Creating a list of installed programs for later

Sometimes when you move from one server to another, you need to keep a list of programs you need. One simple way to get this list is:

dpkg --list |egrep -o '^ii\W+(\w+)'|egrep -o '\w+$' >> installed_programs.lst

Which will create a file called installed_programs.lst with a list of installed programs. Then, if you need to install all these programs, you can simply use:
xargs aptitude install < installed_programs.lst

Doing something in a directory, a simple bash line

If you are recoding large directories of files, or creating directory indexes, you may need a script that runs another script in a directory. The easiest way to do this is probably using something like the bash for loop:

for dir in *; do
  cd "$dir"
  indexThisDirectory
  cd -
done;

Although you may think this should work, it has a small problem: if the directory does not exist, the first cd will fail and cd - will bring you back to the last dir you did. After entering that directory, the next directory will fail and bring you even more back into time etc.

A solution may be the following:

for dir in *; do
  cd "$dir" && (indexThisDirectory ; cd - )
done;

Which makes sure to only cd - when you enter the directory correctly. But now we go a step further and run into something else. How do we combine this with xargs? The obvious solution:

find ./ -type d -print0 |xargs -0 -n1 -IDIR cd "DIR" && (indexThisDirectory ; cd - )

won't work correctly: the && will become part of the a new command as bash interprets it as the end of the xargs command and a conditional.

Tired of hacking together and to stupid to find the good obvious solution, I decided to write a little bash script which entails the last part of the previous xargs command and save it as inDirDo:

NeXt onine: the online speed-dating chatbot

Because Google Talk has openend up to any jabber server online, I decided to start running my own chatbot! It's a kind of speed dating thing, online.

Adding an "Open all" button to Hotmail for Firefox

Hotmail does not have a "Mark all as read" button. To do something similar, here is a chickfoot trigger script that will add an "Open all" button, which will open all unread messages in Firefox tabs.

To use this you will need Firefox and the Chickenfoot extension.

Public television's magic word for security

The dutch public television hosts some of their programs online at www.uitzendinggemist.nl and they do it using the (yes, how stupid can they be) windows media format.

Because I don't use or own any Microsoft systems, I have to make due with reverse engineered FOSS solutions. No problem there, because gstreamer has a plugin and playing back the media will work most of the time.

Download more of The Daily Show then you can look at

The Daily Show can be viewed online. Most pieces of the program are online, and appart from having more ad space, I can't see why they split up the episodes.
However, if you don't want to keep clicking, you can just download most of the early daily shows...

Show the places you logged in from

I only use a few locations to log into the shell accounts I have, so looking at whether an unfamiliar host has used logged in can help heighten security. Only the time of the last login can help me detect whether somebody has been using one of the machines I've been using to access my account without my knowledge, so it's a good idea to also show the last login with the date and time.

Syndicate content