Skip to main content

Ralsina.Me — Roberto Alsina's website

Big news in my life

Rosario is preg­nan­t. Yipee! :-)

She is now about 6 weeks preg­nan­t, and all three of us are do­ing fine (but she's hav­ing bad morn­ing nau­se­a... should go away in an­oth­er 6 week­s... but that does­n't seem to be any help ;-)

The first echog­ra­phy is sched­uled for Sep­t. 15, ex­pect pic­tures of the tiny bean-­like alien in­vad­er.

It's the first grand­kid on her side of her fam­i­ly, so it's be­ing pre­emp­tive­ly spoiled by all her/his/its aunts/­grand­par­ents/what­ev­er. Our house is be­ing pre­pared for a flood­ing of knit­ted out­fits and re­dun­dant child­ware by strength­en­ing the floor­board­s.

I am quite at a loss for word­s, and have not been use­ful for al­most any­thing for the last two weeks since we found out­... I am to­tal­ly spas­tic with hap­pi­ness.

On oth­er news, I was just start­ing to work on pre­par­ing my stu­dio... which will now be made the child's bed­room. Do I care? No! It's just an ex­cuse to ac­tu­al­ly build the of­fice in the roof I want­ed all along (so I can work with my cat­s, too :-), so ev­ery­body win­s.

Linux Installation Kung Fu

I de­cid­ed to try Arch Lin­ux on my note­book. The rea­sons don't mat­ter.

How­ev­er, there was this prob­lem about the CD drive be­ing bro­ken, and the lack of a flop­py drive.

So, how did I do it?

I had a par­ti­tion I could de­stroy (/de­v/h­da3)

I in­stalled qe­mu.

Then, I start­ed qe­mu us­ing the whole HD and a CD ISO im­age (boot­ing from the CD!):

qemu -hda /dev/hda -cdrom arch-0.7.1.iso -boot d

Then, very care­ful­ly I in­stalled it on hda3 and did not in­stall GRUB.

Copied the ker­nel and ini­trd im­ages to /boot on the oth­er lin­ux in­stal­la­tion.

Edit­ed grub.­con­f, adding the Arch en­try...

And it worked.

Keep in mind that if you make a mis­take, this will com­plete­ly de­stroy all your da­ta. But if you are care­ful, and have enough space, you can in­stall your next Lin­ux while you use your cur­rent one.

Now, is that cool or what? :-)

Cool toys: Synergy

In the last week or so I have been re­or­ga­niz­ing my workspace. Or rather, Rosar­i­o's workspace, and that meant mov­ing some fur­ni­ture my way.

One of the things I got is a long desk­top, with room for two PCs (it was used in the class­room in Conec­ti­va, and I got it as part of my sev­er­ance pay­men­t).

So, I put my desk­top on it, a key­board and mouse of the tray be­low, and my home serv­er on the oth­er side of it.

That home serv­er has been head­less for a loooong time.

But since I have room in the table, I hooked a mon­i­tor, key­board, mouse set to it, and thought "maybe it will work as a guest ma­chine", for when some­one comes to work or stay at my place.

Then I thought, there must be some way to use one key­board and mouse to drive both ma­chi­nes, and start­ed look­ing for KVM switch­es and stuff.

Then I thought... maybe there is a way to do it by soft­ware... and yeah! En­ter syn­er­gy ...

You run a serv­er on the box with the key­board, and a client on the oth­er­s. Ex­plain the re­la­tion­ship be­tween them in the sim­ple con­fig file... that's it.

Now I can slide the mouse off a screen to the oth­er com­put­er's, and you even share a clip­board!

Re­al­ly, re­al­ly, re­al­ly nice stuff. Works flaw­less­ly.

And since I am a bit weird in my ways, now... how can I make this work as a xin­era­ma so­lu­tion, where all the apps are in my note­book, and the oth­er is just a dis­play server?

Right now, I am start­ing a full screen FreeNX ses­sion point­ed back at me, so ev­ery­thing is on the same box. But I can't move win­dows be­tween both mon­i­tors.

I think with some cre­ative think­ing this can work. X app dis­play mi­gra­tion...

Ideas for SMTP plugins

The on­ly cur­rent soft­ware I wrote that some peo­ple ac­tu­al­ly use is called RA-­Plu­g­in­s. It's a se­ries of prog­gies you plug in your SMTP server's con­ver­sa­tion, and do di­verse things with it, like re­ject­ing mes­sages that fail cer­tain cri­te­ri­a, check­ing the sta­tus of the re­cip­i­en­t's ac­coun­t, what­ev­er.

In­ject­ing this stuff in the mid­dle of SMTP is good be­cause it means you will re­ject the mes­sages be­fore they get in­to your serv­er. But... I am run­ning out of ideas, so... have any you can spare? :-)

You can see the cur­rent plug­in list here and the on­ly ideas I have left are:

  • A plug­in that calls back to the sender's email serv­er and tries to email him, ala mil­ter-sender to catch forged sender­s.

  • A plug­in to au­­towhitelist in spa­­mas­sas­sin those ad­­dress­es to which you send mail.

  • A plug­in to keep an ac­­count of how many con­nec­­tions you hold to each IP, and lim­it them. (Not cur­ren­t­­ly pos­si­ble)

If you un­der­stand what I wrote, and have any ideas... feel free to post them as com­ments and/or email me with them!

Annoying APIs: djbdns

Look­ing for a sim­ple way to lookup the MXs for a giv­en do­main, I ran in­to lib­d­jbdns. Which has a de­light­ful­ly sim­ple API.

Of course it has its wrin­kles.

Con­sid­er the MX lookup in­ter­face:


Where out and fqdn are stral­locs (a sort of string that can con­tain 0).

But just try pars­ing out! Here's the ex­pla­na­tion:

Each MX record is a two-byte MX dis­tance fol­lowed by a 0-ter­mi­nat­ed dot-en­cod­ed do­main name. If the do­main does not ex­ist in DNS, or has no MX record­s, out will be emp­ty.

Be­cause al­most noone us­es MX dis­tances high­er than 256, sad­ly, this usu­al­ly looks like this (sor­ry for the no­ta­tion ;-)

\0 10 f i r s t . m x \0 \0 20 s e c o n d . m x

So, you can not split on the NULLs be­cause there are NULLs in the dis­tances.

Which is not hard to parse, but is def­i­nite­ly more an­noy­ing than it should be. How hard would it be to re­turn an ar­ray of struct­s?

Contents © 2000-2020 Roberto Alsina