2014

JanFebMarApr
MayJunJulAug
SepOctNovDec

2013

JanFebMarApr
MayJunJulAug
SepOctNovDec

more...

2011

JanFebMarApr
MayJunJulAug
SepOctNovDec

2010

JanFebMarApr
MayJunJulAug
SepOctNovDec

2009

JanFebMarApr
MayJunJulAug
SepOctNovDec

2008

JanFebMarApr
MayJunJulAug
SepOctNovDec

2007

JanFebMarApr
MayJunJulAug
SepOctNovDec

2006

JanFebMarApr
MayJunJulAug
SepOctNovDec

2005

JanFebMarApr
MayJunJulAug
SepOctNovDec

2004

JanFebMarApr
MayJunJulAug
SepOctNovDec

2003

JanFebMarApr
MayJunJulAug
SepOctNovDec

Photolog

Through the Looking-Glass
2010-10-12: Through the Looking-Glass
My radio speaks is binary!
2010-10-10: My radio speaks is binary!
Gigaminx: (present for my birthday)
2010-09-16: Gigaminx: (present for my birthday)
Trini on bike
2010-09-05: Trini on bike
Valporquero
2010-08-28: Valporquero
My new bike!
2010-08-22: My new bike!
Mario and Ana's wedding
2010-08-13: Mario and Ana's wedding
Canyoning in Guara
2010-08-07: Canyoning in Guara
Trini and Mari in Marbella
2010-08-05: Trini and Mari in Marbella
Trini and Chelo in Tabarca
2010-08-03: Trini and Chelo in Tabarca
Valid XHTML 1.1
Log in
Blog is working again Sep 23, 2010
Labels: PHP blog

I have had a long pause due to internationalization issues...

Now, every blog entry has (or better, can have) different content in Spanish and English pages.

In fact, it has been working for a while, but until today I couldn't create new entries :-)

Labels: LaTeX how-to

In LaTeX there are 10 special characters:

# $ % & \ ^ _ { } ~

Most of them can be escaped prepending a simple backslash, but \, ^ and ~ need special treatment:

  • for backslash (\) use \textbackslash{}
  • for caret (^) use \^{} or \textasciicircum{}
  • and for tilde (~) use \~{} or \textasciitilde{}

In short:

To getYou must use
#\#
$\$
%\%
&\&
\\textbackslash{}
^\textasciicircum{}
_\_
{\{
}\}
~\textasciitilde{}
Labels: emacs how-to

If you want to make GNU Emacs fullscreen, there are three things you should do:

  • Disable tool bar
    This can be accomplished executing (inside Emacs) (tool-bar-mode -1)
  • Disable menu bar
    This can be done executing (menu-bar-mode -1)
  • Go to full screen mode
    You have to execute (set-frame-parameter nil 'fullscreen 'fullboth)

If you want to disable always tool bar and menu bar, like me, and you want to be able to go to full screen with a keystroke (F11, for example), add this to your .emacs:

;; F11 = Full Screen
(defun toggle-fullscreen (&optional f)
  (interactive)
  (let ((current-value (frame-parameter nil 'fullscreen)))
    (set-frame-parameter nil 'fullscreen
      (if (equal 'fullboth current-value)
        (if (boundp 'old-fullscreen) old-fullscreen nil)
        (progn (setq old-fullscreen current-value)
          'fullboth)))))
(global-set-key [f11] 'toggle-fullscreen)

;; Disable tool-bar
(tool-bar-mode -1)

;; Disable Menu Bar
(menu-bar-mode -1)
Baboon Command Sep 18, 2010
Labels: bicycle

After about one month insisting that we should do it, my cousin Iván convinced a few people to ride the anillo ciclista de Madrid on byke, ant in the middle of the night, beginning at 22:30.

It took about 3 hours and a half to travel 66 kilometers. Our average speed was 19 kilometers per hour.

Today is my birthday. And my workmates made me a present: a Gigaminx (just like a Megaminx, but with 5 pieces in each edge, instead of 3).

If you want to have a file crypted, so that noone can see its contents unless they have the correct password, you can use "gpg" to cypher or decypher it. However, its use is a bit complicated.

So, I decided to write a small shell script, called "gpg-vi", which asks for a password, and lets you edit a file, symmetrically crypted using GnuPG with that password.

The script will not let anyone else in that machine to see the contents of the file, but warning: the script writes the contents of the file in plain in a file in /tmp, so that your user id, or root, can see that file until the edition is finished (or even later, because the contents may still be there in the disk after deleting the file).

La Melonera Sep 11, 2010
Labels: running

The Melonera is a popular race held for 15 years in September, coinciding with the festivities of La Arganzuela.

It's a race of about 10 kilometers, and the more remarkable thing about it is that at the end of it, a slice of melon is given away to all who have finished it :)

This year the race was 10060m long, and my time was 1 hour, 10 minutes and 41 seconds.

Labels: SQL Perl how-to

(or, how to use History Tables in PostgreSQL)

If you would like to store somewhere the full history of all the insertions, updates and deletions in all your tables (to maintain a wiki-like database), there is no simple way to do it... but here you can find a way to do it, in an article written by Thomas Liske.

It works in PostgreSQL, creating a PL/Perl database trigger called log_history() which adds a line to a new table called history.<SCHEMA>_<TABLENAME> with a timestamp (hist_ts), the operation (hist_op) and all the columns, whenever a INSERT, UPDATE or DELETE is executed. This effectively stores all the history of the tables where the trigger is used.

Here you can view the log_history trigger, and a simple function to bind the trigger on all the tables in a schema, history_create_triggers. You can call this function for schema "public" with SELECT history_create_triggers('public');

These two functions are written in PL/Perl and PL/pgSQL, respectively, so you have to add those language to your PostgreSQL database, if you have not already done so, with CREATE LANGUAGE plperl; and CREATE LANGUAGE plpgsql;