Hard Drive Crashes … foremost to the rescue

If your hard drive crashes … you may use foremost to retrieve your documents, photographs and so on.

Foremost is a linux tool for conducting forensic examinations. Although intended for law enforcement purposes, it may be useful to other members of the community. Foremost reads through a file, such as a dd image file or a disk partition and extracts files.

Foremost is available for most *nix platforms and Windoze via CygWin. Foremost is useful when you can’t mount a ddrescue image.

Execute the following command:

foremost -t all -i my_crashed_harddrive.dd

… and all your documents should hopefully be rescued 🙂

Plum Jam Recipe

Here is an easy recipe for Plum Jam…

Prep Time: a few min
Cook Time: 15 min

Ingredients:

  • 1 kg plums, split in four, seeds discarded
  • 1/2 dl water
  • 3-4 dl sugar
  • juice of 1 lemon

Preparation:

Rinse and split plums in four and discard the seeds.
Place plums, water, and lemon juice in a non-aluminum stockpot. Bring to a boil and reduce heat to low, and let simmer for 15 minutes, stirring occasionally, until fruit is soft.
Stir in sugar and bring back to a rolling boil while constantly stirring.
Enjoy!

Flight from Tromsø to Oslo

A few weeks ago (26. Aug) I visited Tromsø during my work. We have a Bell sea gravimeter (BGM-3) which was located at M/S Franklin. The instrument had been located on this ship for a few months and it was time to unmount it.

After a few hours of work the instrument was safely stored at our land based storage, and I was able to pay a short visit to my cousin here in Tromsø.

On my return flight to Oslo the weather was quite nice and and I manged to take a few picture of Senja, Lofoten, a glacier (Svartisen) and sunset in the Oslo area.

The first picture shows Senja, with the island Andøya in the background. On Senja you may see the fjords; Gryllefjord, and Sifjorden, and you may also spot the places Grunnfarnes and Kaldfarnes among other.

Sifjord, Veimann, Kaldfarnes, Gryllefjord

Here we see the bridge over to Sommarøy and Hillesøy (Senja)

Sommarøy

The glacier Svartisen not far from the city Bodø

Svartisen

Sunset seen from the plane.

Sunset from the airplane

SSH and RSYNC without password

Tried of typing your password every time you use ssh or rsync? If so, you should create a local ssh key for your computer and append your key to the remote computers you usually login to.

1. Generate your ssh key on your local computer:

local> ssh-keygen -t rsa

2. If prompted for file name to store your key, select the default (id_rsa).

3. Do not enter a password when asked. This will generate a password-less key and a public key. If you have   selected the default names, then those will be: id_rsa (password-less key) and id_rsa.pub (public key)

4. Copy the public key (id_rsa.pub) to the machine you want to ssh/rsync to. Avoid overwriting your RSA key at your remote host by renaming it first.

local> cp id_rsa.pub yourlocal_key.pub

local> scp yourlocal_key.pub you@remote-machine:

remote> cat yourlocal_key.pub >> .ssh/authorized_keys

remote> rm yourlocal_key.pub (cleaning up)

And now your remote computer will accept a ssh login without prompting you for a password.

Free Web based Project Management Software

Here are a list of several free web-based project management software.

  • Collabtive
    • Key features are: Projects, Milestones, Task, Basecamp import, Timetracking, Reporting
  • Redmine
    • Redmine is a flexible project management web application. Written using Ruby on Rails framework, it is cross-platform and cross-database.
  • eGroupWare
    • EGroupware is a enterprise ready groupware software for your network. It enables you to manage contacts, appointments, todos and many more for your whole business.
      EGroupware is a groupware server. It comes with a native web-interface which allowes to access your data from any platform all over the planet. Moreover you also have the choice to access the EGroupware server with your favorite groupware client (Kontact, Evolution, Outlook) and also with your mobile or PDA via SyncML.
  • OpenGoo
    • OpenGoo is an Open Source Web Office. OpenGoo gives you all the tools to manage the work of all the divisions of your company. You can plan and manage all your projects, easily following the status of every task.
  • dotProject
    • dotProject is a web-based project management application, designed to provide project layout and control functions.

Last ski weekend

Last ski weekend of the season at Kvitfjell alpine center was the last weekend of April this year. Kvitfjell alpine center arranged the olympic downhill in 1994 at Lillehammer.

The weather was very nice, sunshine and 5 – 10 C. The skiing conditions degraded quite rapidly during the weekend, but we managed to avoid damaging our ski too much.

Kvitfjell Offpist anyone
Ove Michael and Martin

How to create a MySQL database

Here we will show how to install and create a MySQL database. We will also create a MySQL user with access to our new MySQL database. We will GRANT our user all privileges on using the database.

Install mysql

Install mysql-server from your distro or using apt-get install mysql-server. During installation you a password for root is set.

If you get this error message you should install mysql-server.
> mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Connect to MySQL

After you have installed mysql you should be able to connect to mysql.
> mysql
ERROR 1045 (28000): Access denied for user ‘xxx’@’localhost’ (using password: NO)
This error is due to no user with name ‘xxx’.

Connect by providing username and password:
> mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 34
Server version: 5.0.75-0ubuntu10 (Ubuntu)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

End your session by typing either quit or exit at mysql>

Create a MySQL database

We are connected to mysql as root.
In the next line we create a mysql database with name ‘wordpress_db’

mysql> create database wordpress_db;
Query OK, 1 row affected (0.00 sec)

mysql>

Create a MySQL user

Let’s create a user ‘wp_user’ with a given password ‘mypassword’ at ‘localhost’.

mysql> CREATE USER ‘wp_user’@’localhost’ IDENTIFIED BY ‘mypassword’;
Query OK, 0 rows affected (0.00 sec)

mysql>

Grant user all priveleges on your MySQL database

mysql> grant all on wordpress_db.* to ‘wp_user’@’localhost’;
Query OK, 0 rows affected (0.00 sec)

mysql>

Earth Hour

As a large part of the inhabitans of Oslo we participated in this years Earth Hour on 28. March 2009. An estimate from the power company indicates that during the Earth hour Oslo used approximately 300 millions Watt less than normal. That’s approx 5 millions light bulbs of 60 Watt! Here is a picture from our living room during the Earth hour, with only candle and fire place visible.
Earth Hour