Place Ghantoos

kvm/qemu bridging with dummy network card

I wanted to setup some VMs using kvm (i had the same problem using xen). The solution a chose to connect my VMs to the internet was to do it through bridging.
My only problem is that my eth0 (main and only ethernet card is connected straight to the Internet. So bridging loses its meaning because I could not choose new IP addresses for my virtual boxes.

The solution: creating a dummy network interface!

With this scenario, i’ll have all my dumUs bridged to the dummy interface (dummy0) and the bridge (br0) NATed through eth0. I hope I’m clear enough. : )

Here is how my /etc/network/interfaces file looks like:
Read the rest of this entry »

HOWTO: apache2 & mod_python.psp

Here is a second howto about the PSP handler of mod_python.

Hope this is useful!

http://ghantoos.org/index.php/howto-apache2-mod_python/#mod_python.psp

Cheers,

Ghantoos

HOWTO: apache2 & mod_python.publisher

After a bit of research and some debugging time, and as i couldn’t find obvious mod_python howtos, I decided to write a little Apache2/mod_python.publisher howto.

http://ghantoos.org/index.php/howto-apache2-mod_python/

Cheers,

Ghantoos

Apache mod_python local module import

I have searched a lot before finding this tip, so I post it.
It show how to easily import with mod_python a module based on a personal .py file located somewhere on your box.
In this example, I will try to import the module bloup.py located in the same directory of my index.py mainpage.
when trying to import using the usual means, i get:

#!/usr/bin/env python
import os
import bloup
...

>>>ImportError: No module named bloup

The solution I found was:
Read the rest of this entry »

NextGen Gallery SQL script (to scan folders and add them as galleries)

This time I needed this time to provision the NextGen SQL database with all the folders I’ve put on my server.

Again, i did a little python script. I scans your NextGen gallery folder, and enters all new folders as “galleries” in the SQL DB, and creates the thumbs for the pictures.

This was usefull for me. : )

You can download the script here.
Read the rest of this entry »

Picture database recursive copier/resizer

That a little script I did yesterday because I needed to copy my 35gig picture gallery in a new directory then resize all the pictures.

Of course, this MUST not be done “à la mano”! So i did a little python script. : ) Here it is, hope you find it of any interest.

You can download the script here.
Read the rest of this entry »