Merging of Git Repositories

If you ever need to merge multiple git repositories into a single repository and also keep the history, then i have just the script for you. This script will keep your branches and tags, but since tags often are called the same, the tags and branches of a repository is renamed so that the original […]

Maven & Git: Releases and Hotfixes

When you write an application you want a simple way to release a new major version, but also to release bugfixes (here i call them hotfixes) to a released version.¬†If you write Java applications, chances are, you are using Maven and then as a source control you might be using GIT. Maven offers a nice […]

How do you merge two git repositories?

I’ve had the issue of needing to merge multiple git¬†repositories into one repository with preserving the history, branches and tags. This isn’t a trivial feat, as the repositories have a large history, many branches and tags and of course names of those branches and tags overlap. While trying to solve this issue i searched the […]

Java Equals and HashCode by Reflection

Writing proper ”equals()” and ”hashCode()” methods A class which is to be used in Maps and Sets must always have their equals() and hashCode() method overridden so that they reflect the data structure of the actual object. This means that the fields of the object which are required for equality must be taken into account […]

Postfix Satellite configuration: Remote SMTP with auth

If you have ever run into the problem that your computer will not send e-mails directly, then this might help. Install Postfix and configure it as a satellite server. This was done on a Ubuntu desktop installation, so I don’t know what Fedora and co. will say. In the /etc/postfix/ file add or modify the […]

Makefile to compile C code

During my phases where I learn to write in C, I don’t want to keep creating new Makefiles. Thus after searching all over the net I managed to put together this simple Makefile. It expects your source code to be in ./src and it will put the compiled executables in ./bin # # Makefile to […]

Adding new LaTeX packages and styles

This is a quick explanation on how to install new LaTeX styles so that you can use them, but without having to change your system. First download a style from CTAN Then unpack the zip somewhere in your home folder Copy the styles/packages to ~/texmf/tex Run the command mktexlsr or texhash Use the package and […]

Ubuntu Netboot

Notes on getting Ubuntu netboot to work so that I don’t have to burn any CD’s This document expects a DHCP server to be available in the network Install tftp sudo aptitude install tftpd-hpa tftp-hpa Get netboot files: cd /var/lib/tftpboot sudo wget -r -nH -np –cut-dirs=8\ ubuntu/dists/maverick/main/installer-amd64/\ current/images/netboot find ./ -name “index.*” | sudo […]

VirtualBox resolution problems in a headless environment

In certain cases running a VirtualBox VM in a headless linux environment can lead to a Windows XP having an undesired resolution. I fixed this using the following two commands: Global command: VBoxManage setextradata global GUI/MaxGuestResolution 1920,1200 For a running VM: VBoxManage controlvm “remote” setvideomodehint 1920 1200 24 I found the resolution in this forum: […]

aptitude search vs apt-cache search

Over the years I have grown used to the fact that when I search for a package on a debian based distro, then I use: apt-cache search foo bar The result was a list of all the packages which had the text ‘foo’ and ‘bar’ in the description. Lately it has been discouraged to use […]