Memcached – Pages/Chunks and Rebalancing

It’s important to know how Memcached organizes the available memory and how Objects are saved to understand “strange” effects.

Memcached has Pages that have a size of 1Mb (in newer version you can configure them from 1Mb to 128Mb), these Pages are divided in Chunks. The size of the Chunks is created dynamically after start, depending on the size of the Objects you are saving. Memcached tries to save a Object in a Chunk were the basted space is minimal (An 49Kb Object will be saved in an 50Kb Chunk)

Read more... (466 words, 2 images, estimated 1:52 mins reading time)

Spidermonkey – Execute javascript from console

SpiderMonkey is the code-name for the Mozilla’s C implementation of JavaScript. This is useful to test part of our JavaScript from the console or in scripts.

In Debian we have a package called spidermonkey-bin.

Read more... (173 words, estimated 42 secs reading time)

Installing TRAC with mod_wsgi using virtualenv

This guide is for installing Trac as a user using virtualenv for a isolated Python environment so that the whole installation runs under a specific user.

First of all we need to install needed packages

apt-get install libapache2-mod-wsgi python-virtualenv python-setuptools

Once we have installed the required packages proceed to create the Python environment

mkdir /usr/local/trac
cd /usr/local/trac
virtualenv python

We now have the isolated Python environment locate under /usr/local/trac/python.

To make possible to use easy_install with repositories we need to upgrade easy_install. I use this to install Trac plugins directly from SVN.

/usr/local/trac/python/bin/easy_install -U trunk

We now can install trac 0.12 using the 0.12b1 SVN Tag (http://svn.edgewall.com/repos/trac/tags/trac-0.12b1 or Trac==0.12b1) or directly from SVN Trunk:

/usr/local/trac/python/bin/easy_install http://svn.edgewall.org/repos/trac/trunk

This will download and install the latest trunk version for Trac.

Read more... (212 words, estimated 51 secs reading time)

Netbeans Performance Switches

I recently have began to use Netbeans because I’m sad that Eclipse is every time slower and it frozes every time when you are doing something to fast.

Netbeans is not perfect, and there are some features that need to be polished (Ex.: SVN Support, Time Tracking like Mylyn), but the PHP/HTML/CSS/JS Support is excellent, in my opinion better than the Eclipse PDF support.

These is my netbeans_default_options for Netbeans for MacOSX (under Windows you can leave out the –laf switch, it’s for changing the look and feel):

Read more... (495 words, estimated 1:59 mins reading time)

Vlogin – Roundcube Plugin

I just released the first version of my Vlogin Plugin for Roundcube. This plugin is based on the Vlogin for Squirrelmail.

For now the only implemented function is that you can login using only “user” and roundcube will authenticate against IMAP using the domain extracted from the webmail URL.

You can get download the plugin from the Vlogin sourceforge project page.