2 ways to your offline wikipedia

… for whatever reason you might need that ;)

For both ways you will need the dumps, you get them here:
http://dumps.wikimedia.org/dewiki/latest/
The main dump is the pages-articles.xml.bz2 if you want the categories as well, you need the
category.sql.gz and categorylinks.sql.gz too.
The pages file is quite huge and will take you probably about 4 hours to download, depending on your connection.

You will also need a fresh and running installation of the mediawiki software.
Install it and here we go:
Continue reading “2 ways to your offline wikipedia”

Migrate to Mongolab

Recently i ran into RAM troubles on my vserver for some reasons, i encountered the evil:

Cannot allocate memory at ...

So first i suspected mongodb to use up loads of memory as top showed.

But after some recherche work i learned mongodb only -seems- to use a lot of memory.
see here and here and here
The actual usage was around 20mb RAM, so mongodb was innocent.

The true RAM monsters were some apache and php-fpm zombies, but thats another story.

While suspecting mongodb i thought about outsourcing the mongodb and i found a free and sufficient offer in mongolab.
My interests were on and i gave it a try.
The free version has a limit for up to 240MB storage and since my app is just a small counter it should last for some time.
Continue reading “Migrate to Mongolab”

OXID eShop manufacturer long description module and fck editor module

I recently made my first OXID eShop module: OXID-manufacturer-text-mod
Which basically adds a long description field to the manufacturer.

This comes just as a normal textarea, as usual in OXID CE.
If you would like to add an Richtext Editor, you can purchase the fck Editor module
and install it, if you did not already.

After you installed the fck module your textareas of the basic shop are rich text.

But since the manufacturer long description comes from the module, you have to teach the fck module the new field.
Continue reading “OXID eShop manufacturer long description module and fck editor module”

Synchronous http request in node.js, that you dont want, probably

Achtung dummy code!

…and so it goes Asynchronous:

 for(var i = 0; i < loop.length; i++)
 {
	var proxy = http.createClient(PORT,SERVER);
	var request = proxy.request('GET', url, 
        {
            "host": SERVER
        });
	request.end();
	...
 }

fire, fire, fire, fire

… and so it dont, Synchronous then:

var proxy = http.createClient(PORT,SERVER);
 
for(var i = 0; i < loop.length; i++)
 {
	var request = proxy.request('GET', url, 
        {
            "host": SERVER
        });
	request.end();
	...
 }

point – shoot, point – shoot, point – shoot

well i didnt know that :)