Tortitas (pancakes)

— [ edit | raw ]

Típicas tortitas americanas.

unfriendly commands: git dealing with a repository in other directory

— [ edit | raw ]

mercurial

$ hg -R foo/bar st

git

$ git --git-dir=foo/bar/.git --work-tree=$(pwd)/foo/bar status

Configurar tarjeta Realtek 8723AE en Debian

Esta receta explica cómo configurar una tarjeta rtl8723AE en una distribución Debian.

Testing deterministic behavior with doublex

Sometimes you need to test that some procedure is deterministic, that is, it is done exactly the same way again and again (builder or factory method patterns are examples of that). The production code does exactly the same invocations for the same arguments. In these situations were are not checking the “right” behavior but just the invocation sequence does not change.

You may use a doublex Mock to test that. The first execution “trains” the Mock, the second time verify the same behaviour.

Reducir resolución de un PDF

— [ edit | raw ]

Este comando es relativamente fácil de encontrar, pero no está mal tenerlo a mano. Obviamente la gracia del asunto es el parámetro -r200x200:

$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -r200x200 -sOutputFile=output.pdf input.pdf

Getting node terms from the drupal database

Migrating a drupal-6 site to jekyll I need to get term names to add the tags entry in the post YAML from-matter.

I am using the jekyll-import ruby gem. The modification is easy and can be added directly to the drupal6 plugin.

I apologize if this code smells. I am not a ruby programmer… yet.

Cómo publicar en CRySoL

Esta receta explica cómo crear posts en tu propio blog de CRySoL o colaborar con el sitio.