triptico.com: Angel Ortega's Site

2008-11-18

Mouse cursor jumps like crazy under QEMU

Just set the following environment variable:

 export SDL_VIDEO_X11_DGAMOUSE=0

2008-11-17

Major site redesign

Triptico.com has been moved from static pages to an instance of the Gruta web content management system.

This means optimal search, page tagging and much more. Enjoy!

Cálculo de la letra del NIF español, en una línea de shell script

 nif() { echo $1$(expr substr TRWAGMYFPDXBNJZSQVHLCKET $(($1 % 23 + 1)) 1) ; }

Acepta como primer argumento el número de NIF (sin ceros por delante, si los llevara). Útil para añadir a ~/.bashrc.

2008-11-12

Comparador de depósitos. Bankimia.com

http://www.bankimia.com/depositos/

2008-11-07

How To Verify CD-R Data Retention Over Time?

http://hardware.slashdot.org/article.pl?sid=08/11/06/1549256

The following two interesting tools are referred there:

par2 - PAR 2.0 compatible file verification and repair tool

"par2 is a program for creating and using PAR2 files to detect damage in data files and repair them if necessary. It can be used with any kind of file."

dvdisaster - data loss/scratch/aging protection for CD/DVD media

"dvdisaster provides a margin of safety against data loss on CD and DVD media caused by scratches or aging media. It creates error correction data which is used to recover unreadable sectors if the disc becomes damaged at a later time."

Dvdisaster approach is specially interesting, as it can append its error correction information to an existing .iso file, using as much space as available to fill the smallest medium size (CD, DVD or DVD9). That information seems to be invisible, so it does not interfere with the media content.

 dvdisaster -i cd.iso -mRS02 -c

2008-11-03

Ode to Enum

http://codingrelic.geekhold.com/2008/10/ode-to-enum.html

2008-10-30

¿Qué pasa si dejo de pagar la hipoteca?

http://www.idealista.com/pagina/nota-prensa?numNotaPrensa=1&anyoSeleccionado...

More on Apache's mod_rewrite

Links:

What I use here to emulate static pages:

 RewriteEngine On
 RewriteRule /(img|download)/.* - [L]
 RewriteRule /(.+)/(.+)\.html     /?t=STORY&topic=$1&id=$2 [PT]
 RewriteRule /(.+)/index\.html    /?t=TOPIC&topic=$1       [PT]
 RewriteRule /(.+)/               /?t=TOPIC&topic=$1       [PT]

2008-10-27

Redirect All HTTP Requests to a Single Page

http://journal.dedasys.com/articles/2008/10/26/redirect-all-requests-to-a-single...

2008-10-17

Sharing code via email with git

In a clone of a remote repository, start a branch to hold your code:

 git-checkout -b my-changes

Do your work and commit changes as you like.

When you are happy with your work, create a temporary directory:

 mkdir /tmp/patches

Then change back to the master branch and build a set of patches from your branch with git-format-patch:

 git-checkout master
 git-format-patch -n master..my-changes -o /tmp/patches

A bunch of files, one per changeset, have been created in /tmp/patches. Now, use the git-send-email to send them, one per email, to the original author.

 git-send-email --no-thread --from me@here --to author@remote /tmp/patches

If author@remote acknowledges your changes, you can just merge your changes to the current master head and delete your temporary branch:

 git-merge my-changes
 git-branch -d my-changes

On the remote machine

If author@remote uses mutt, he can move to his working copy, call it and type |git-am on each message.

2008-10-16

Variable destructor support in GCC

http://www.airs.com/blog/archives/257

2008-09-29

Matching git-svn strange authors to useful email addresses

Git-svn is a useful tool to communicate with a Subversion repository from git. You usually clone a repository with a command like:

 git-svn clone svn+ssh://angel@svn.example.com/path/to/prj/trunk prj

And a prj directory is created with a full git repository. Then, you get another people changes with git-svn rebase and commit yours with git-svn dcommit.

It has one drawback, though; authors are mangled to something like

 Author: angel <angel@2e99d34b-3c1d-0410-9ca7-923d03b5684e>

which is not only ugly but completely useless.

To map this monstrosity to real user email addresses and names, use the following steps:

First, create the file ~/.gitusers with content like this:

 angel = Ángel Ortega <angel@triptico.com>
 otheruser = Other User <ouser@example.net>

If you converted your SVN repository from CVS with something like cvs2svn you'll also find entries like this:

 Author: (no author) <(no author)@2e99d34b-3c1d-0410-9ca7-923d03b5684e>

Those ones can be converted with another line in ~/.gitusers.

 (no author) = Really Me <email@example.org>

And now, instead of the usual git-svn clone command, use the following ones:

 mkdir prj
 cd prj
 git-svn init svn+ssh://angel@svn.example.com/path/to/prj/trunk
 git config svn.authorsfile ~/.gitusers
 git-svn fetch

2008-09-27

Minimum Profit

A text editor for programmers

Latest version is 5.1.0. Minimum Profit Release Notes.

2008-09-24

Zombie in My Pocket board game

http://jayisgames.com/archives/2008/08/zombie_in_my_pocket.php

2008-09-23

Space Plumber

The 3D game

Latest version is 1.1.0-rc2. Space Plumber Release Notes.

2008-09-22

Artemus

A template toolkit

Latest version is 4.1.0. Artemus Release Notes.

2008-09-19

camelbox - A build of Perl with Gtk+, packaged and ready for use on 32-bit Windows systems

http://code.google.com/p/camelbox/

2008-07-28

Mixing C and C++ Code in the Same Program

http://developers.sun.com/solaris/articles/mixing.html

2008-07-07

Winchester Mystery House

http://en.wikipedia.org/wiki/Winchester_Mystery_House

2008-07-03

Shepard tone

http://en.wikipedia.org/wiki/Shepard_tone