All posts by Werner

Use Mercurial for easy local revision backup

I regularly make backups of all my data, it’s also synchronized on several computers and hard disks. But since I backup only once a week, I don’t really have several revisions from files available between the backups. This is espacially necessary if you work on some code of a small project, which is not revisioned via svn or cvs – and you don’t want to or have no access to svn. Also you don’t want to set up a local svn or cvs repository. You could use Time Machine on Mac OS X and there are some other tools available on Windows, like FileHamster. But FileHamster wasn’t always trouble free and by coincidence I found another solution which is rather appealing: Mercurial.

The nice thing about Mercurial is, that it is a fast, distributed, lightweight Source Control Management system – you don’t need a server for it. The revisions are save to the local .hg folder. In this post I just explain some basics to get started (on Windows – but apart from the installation process, it’s the same for Mac OS X and Linux).

Continue reading Use Mercurial for easy local revision backup

MinGW binaries of NetCDF 3.6.2

netCDF (network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data”. On its homepage you’ll find a lot of precompiled libraries for Unix derivates but only a binary of netCDF 3.6.1 compiled with Visual C++. It’s possible to use this binary in MinGW also, but I prefer to use libraries compiled with the same compiler toolkit I’m working with. Continue reading MinGW binaries of NetCDF 3.6.2

Create a movie file from single image files (png, jpegs)

In research sometimes you want to make a movie from single images, like plots from experimental data or from calculation to visualize changes or so on. In order to achieve this you can use ffmpeg. First you have to create the images and save them, where the images need to have a continuous number in the filename, e.g. img0001.png, img0002.png, …, …img5467.png. Take care that there is no image missing and that you have enough zeroes in front of the image number, so that the files are in the correct order. Continue reading Create a movie file from single image files (png, jpegs)

Changing the php file upload limit in Ubuntu Linux

If you have your own Ubuntu server running you may encounter the maximal file size upload limit in php scripts which is set to 2Mb as default. In order to change that we first have a look what the size actually is. In /var/www (standard www directory) create a file called info.php with the following content:

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

Continue reading Changing the php file upload limit in Ubuntu Linux

Mounting directory from Mac OS X host in Ubuntu Gutsy Gibbon guest in VirtualBox

There is a new beta version of VirtualBox for Mac OS X available and installing Ubuntu Gutsy Gibbon worked like a charm (in opposition to Parallels). The only problem I encountered was, that it was not possible to mount a directory from the Mac OS X host in the guest system with either the internal mechanism (Folder sharing) and just directly via samba. In the latter case I could mount the host directory and could view it once, but than the mount was always busy and I had no access anymore. But I found another solution: sshfs. Here is a short introduction how to do that:

Continue reading Mounting directory from Mac OS X host in Ubuntu Gutsy Gibbon guest in VirtualBox

Install gnuplot on Ubuntu Gutsy Gibbon

I again have updated these instructions for Gnuplot 4.4.0 RC1 and newer Ubuntu versions. Find them in this post.

Some months ago I wrote a small Howto about installing Gnuplot on Ubuntu Feisty Fawn with readline, pdf and wxWidgets terminal support. It turned out, that this howto was of interest for many people, since this blog post was the most visited until Gutsy Gibbon came out – and the readline problem was obviously solved, since it works now if you install the standard Gnuplot package. Still the pdf and wxWidgets terminal are not compiled in by default, therefore I wrote a new (shorter) howto about including this terminals.

So here are the instructions: Continue reading Install gnuplot on Ubuntu Gutsy Gibbon

Universal binary of netcdf library for Mac OS X (10.5)

In order to create a universal binary of netcdf first read this post. Than issue this configure command:

./configure CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" --disable-dependency-tracking --disable-f77c 

This will correctly build a universal binary of the netcdf library (C and C++). I had to use “–disable-f77” since I only had f2c installed which is not able to compile the netcdf fortran API. “make test” was successfully run.

Compiling universal binaries in Mac OSX 10.5 (Leopard) against 10.4u SDK problem

The hint below is actually a hack. The correct solution would be to add “-mmacosx-version-min=10.4” to the compiler and linker command as mentioned in this post or follow the comment below this post.

If you compile a programm/library on Mac OS X 10.5 (Leopard) against the 10.4u SDK as suggested in this technote to create a universal binary you may encounter this error message:

ld: library not found for -lcrt1.10.5.o

In that case you need to create a symbolic link

sudo ln -s /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.10.5.o

This might solve the linking problem than. This hint was found here and here.

Where is the damn \ and { in Mac OS X?

I recently got a new shiny iMac at work with Mac OS X 10.5 on it. Very nice. I like it. If you are used to the Windows/Linux keyboard, you run into troubles though, since some keys are not there where they should be. In order to find out where the are use the virtual keyboard. This utility is somehow hidden, but here are the instructions how to enable it: Continue reading Where is the damn \ and { in Mac OS X?