8 10, 2011

Searching for bukkit memory leaks

By | 2011-10-08T15:01:39+00:00 October 8th, 2011|Uncategorized|3 Comments

In this post I will describe how to search for memory leaks in your bukkit minecraft SMP server. Getting a heap dump The first step is to obtain a java heap dump to inspect. This is a nice article on the subject: http://blog.emptyway.com/2007/04/02/finding-memory-leaks-in-java-apps/ That article describes some different ways to obtain a heap dump. If you are using a JDK version of java instead of an JRE, you have some neat tools at your disposal [...]

1 10, 2011

Persistent ramdisk with tmpfs and rsync

By | 2012-10-21T08:15:22+00:00 October 1st, 2011|Uncategorized|4 Comments

Minecraft reads and writes a lot from disk. In order to speed this up we can store the files in memory instead. If you google "minecraft tmpfs" you will find a lot of info on this. The main issue is that ramdisks created using tmpfs are temporary. The content is wiped on a system reboot. The script I created takes care of persisting the ramdisk. It is a general solution that can be used for [...]

27 06, 2011

Quick link to edit the hosts file on windows 7

By | 2011-06-27T11:22:14+00:00 June 27th, 2011|Uncategorized|0 Comments

If you edit your hosts-file often it can be practical to have a shortcut that opens the file in a texteditor. This is how you would create such a shortcut on windows 7: Create a normal shortcut to the program notetad on your desktop. Edit the target of the link by adding "%SystemRoot%\system32\drivers\etc\hosts" at the end. That way the target of the link will be something like: "%windir%\system32\notepad.exe %SystemRoot%\system32\drivers\etc\hosts". When you use the link you [...]

21 06, 2011

Creating 301 redirects between many pairs of URLs

By | 2011-06-21T11:17:01+00:00 June 21st, 2011|Uncategorized|0 Comments

I recently upgraded a website. The website consisted of static html documents and some simple php scripts. I transformed it into a wordpress blog. In this process every url was changed. In order to keep the pagerank and not break any inlinks I created 301 redirects between them. If there had been an obvious pattern between the old and new urls this would have been a simple task. For example lets say urls of the [...]

4 04, 2011

Reading browser saved passwords

By | 2011-04-04T17:01:00+00:00 April 4th, 2011|Uncategorized|0 Comments

Assume you forgot you gmail password but you allowed the browser to remember it for you. You can still log in as the browser fills out the password for you, but you can not find out what the password is as all you see is some stars or dots. The situation is cool for now, as you can log in, but as soon as you clear your browser cache the brower will forget the password [...]

23 03, 2011

Creating a Minecraft SMP Bukkit Server

By | 2012-02-19T21:00:58+00:00 March 23rd, 2011|Uncategorized|0 Comments

Get a VPS In the long run you should use a VPS instead of hosting on your own computer. This way you can turn of your computer at home and still be able host the server 24/7. The server should have at least one gigabyte ram. The server should not use OpenVZ for virtualization. It would work but you might face memory allocation issues. You should go for Xen virtualization. In the continuation I will [...]

23 03, 2011

My server setup checklist

By | 2015-09-08T15:18:51+00:00 March 23rd, 2011|Uncategorized|1 Comment

This is the checklist I follow when I create a new Linux Debian Server. The goal is a safe shared hosting environment where every user can ssh to the server but no user can see the content of another users home folder. Setup language You need to setup language if you get error messages like this one [crayon-5a5e4aa21c181985215723/] Run the following two commands to solve the issue: [crayon-5a5e4aa21c189133059483/] File Permissions Files should be restricted to [...]

8 02, 2011

I like .gitconfig

By | 2011-03-28T11:43:09+00:00 February 8th, 2011|Uncategorized|0 Comments

If you use git from the command line you can improve your usage experience by altering your git config file wich is called ".gitconfig". Find that file in your home folder. You can for example turn on color and add some handy shortcuts. Here is what I use: [crayon-5a5e4aa21c851765081230/] It is also possible to alter the gitconfig from the commandline. The settings above would then look like this: [crayon-5a5e4aa21c859403694028/]

7 08, 2010

Free SSL certificates without the browser warning? Yes! It’s possible!

By | 2011-03-28T11:48:20+00:00 August 7th, 2010|Uncategorized|0 Comments

When I need SSL encryption for some admin panel on one of my websites I usually use the snakeoil certificate that comes with the installation of the ubuntu OS (/etc/ssl/certs/ssl-cert-snakeoil.pem). But I can not use this method for a serious web page where I would like to provide ssl for the visitors. The browsers will warn as the certificate was not signed by a well known certificate authority (CA). The reason you might not want [...]

4 08, 2010

Backup your database with mysqldump

By | 2011-06-13T07:48:58+00:00 August 4th, 2010|Uncategorized|0 Comments

Using Automysqlbackup I recently decided to take backups of my mysql database and I found a very good solution for this: http://sourceforge.net/projects/automysqlbackup/ Automysqlbackup is a bash script that uses mysqldump to take daily, weekly and monthly backups of your database. I found many bash-scripts while searching but this script was the best one I found and it is even in the Ubuntu repositories :) To install: [crayon-5a5e4aa21ccad721230564/] Per default it saves the backups to /var/lib/automysqlbackup [...]