informative

Making a small ramdisk or memory storage for temporary calculations

Doing small experiments with databases will almost always make your disk-activity led flicker like it needs to be replaced. However, all that disk activity is not needed as most computers nowadays have enough memory to store even a 100Mb of experimental random data.

Using a memory based SQLite database is not always doable as you may have to share it between different languages and processes. The easiest and most general solution is to create a small disk in memory which you can use to store whatever you want. Here is how...

Download the MOTU development movies from YouTube

The Ubuntu MOTU team has brought out some video's on YouTube. Want to see geeks tell you about packaging? Here is how to download them all.

Cut an APE file into pieces using a CUE file

If you ever encounter one of those old APE files, you should consider either recoding it to FLAC or simply cut it up and put it into a lossy OGG container. Here I will go through the command-line steps to do that last option.

Say we start off with these files:

CDImage.ape
CDImage.cue

Download the MOTU packaging video's from YouTube

There are actually video's on YouTube which will guide you into becoming a Master of the Universe (in the sense of Ubuntu packaging that is) and you can download them by installing youtube-dl:
sudo aptitude install youtube-dl
and then downloading and executing the attached script. Happy viewing!

GDBM class for Boost C++ serializable objects

I havn't writtin the iterators yet, but below is a simple class wrapping a GDBM database allowing you to store Boost serializable objects in the file on disk. Usage is pretty simple:

  Gdbm st(databaseName);

  std::map<std::string, double> amap;
  amap["a"] = 10;
  amap["b"] = 12.5;
  cout << "Into file a: " << amap["a"] << endl;
  st.store("example", amap); //Serialize and store the map

  std::map<std::string, double> fromFile;
  st.load("example", fromFile); //Serialize and restore the map
  cout << "From file a: " << fromFile["a"] << endl;

Shutting down a GNOME session without root privileges

If you want to turn of your computer form the command-line, doing a simple sudo sh -c 'poweroff' is nolonger really an option. The problem with this command is twofold: it will kill everything and you need root privileges for this.

If you want to turn of your computer without root privileges, you can do so using the privileges that gdm has (the login manager). If you are running a GNOME desktop you should use gnome-power-cmd.sh shutdown. You can give other commands to gnome-power-cmd.sh, running it without commands will tell you so.

lgeneral-data

The attached package contains the datafiles for lgeneral. They where created using the instructions from http://ubuntuforums.org/showthread.php?t=435317 and then packaged into a package. I don't think this is in anyway related to the platform, but if it doesn't work, try the ubuntuforums method (after uninstalling this package)

Setting up the UFW firewall with Samba

There is a new firewall, which is probably going to become the Ubuntu standard firewall configuration system. It's called ufw, which stand's for uncomplicated firewall. The script allows you to easily add rules to the already in kernel iptables firewall system and makes sure rules are saved and restored on reboot.

First install the firewall with:

sudo aptitude install ufw
sudo ufw enable

You might also want to change /etc/default/ufw and add add the netbios_ns line so you can use samba:

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.

Syndicate content