tell redis db to not persist

redis persists its memory data in snapshot style in every n seconds depending on your configuration.
read more here.
perhaps you would like to use redis as a pure in-memory db, like f.e. memchache.
you can tell redis to not persist and save some bits&miliseconds.
this could be the case when using redis as a f.e. realtime queue, you wont need persistence,
because you could say: nobody needs is newsfeed from the that day before the machine crashed ;)

alright, do so by:
Continue reading “tell redis db to not persist”

Silex, Twig und HTML5 BoilerPlate

Alright, there is a bundle for H5BP for symfony2 and there is Assetic, you can probably use both with Silex and thats just fine.
But in case you want to keep your Silex project lean (since its micro) you can use Twig and H5BP only and build / deploy your app from the outside.

With a little tuning of the H5BP build, of course / unfortunatly. (Ok thats the caveat)

So i have a structure like so:
web/
(this is the webroot, here is js/css/images, all that asset stuff and the index, here we use the recommended H5BP stuff’n’structure)
views/
(this is outside of webroot and here are all of the *.twig)
Continue reading “Silex, Twig und HTML5 BoilerPlate”

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”