castanyes blaves

Random ramblings about some random stuff, and things; but more stuff than things -- all in a mesmerizing and kaleidoscopic soapbox-like flow of words.


Cross-pollination between Linux and Solaris

We also recognize that diversity and choice are important - which is why we've begun looking at the possibility of releasing Solaris (and potentially the entire Solaris Enterprise System), under dual open source licenses. CDDL (which allows customer IP to safely comingle with Solaris source code) and under the Free Software Foundation's GPL3. It's early days, but we're looking at two things as we make that decision.

First, we're looking at how to reach developers and customers who prefer the GPL - as a large GPL contributor, we want to do what we can to drive more efficiency and cross-pollination between Linux and OpenSolaris. (Why recreate the wheel with technologies like dTrace and ZFS - or GRUB and Xen.)

It would be great to have Sun backing up the GPL to a greater extend...

Happy Chinese New Year!

To all of you who celebrate it!


Howto manage linux partitions from Win32

SSH Tunneling for Firefox

You can create an ssh tunnel to a remote system and use the remote system as a proxy.

Local system: Connect to remote system using ssh and dynamic port forwarding.

ssh -D port-number login-id@remote-node


ssh -D 9999

This establishes a connection to the remote node and configures traffic on local port 9999 to be forwarded to the remote system which acts as a proxy and fulfill the network request.

Firefox Configuration:

* Select "Edit" + "Preferences..."

* Select "Network Configuration"

* Select "Manual Proxy Configuration"

* Select "SOCKS V4"

* Set entries:

o Socks Host: localhost

o Port: 9999

Remote system: The service sshd must be running.

Browser requests will be forwarded to local port 9999 through ssh to the remote node which will fulfill the request. I have tried this for http web request as well as e-mail POP3 inbound mail and SMTP outbound mail and it works!


r-project tip -- difference between perl's hashes and r-project's lists

> But mylist$entrylabel is not working inside the loop.

'$' doesn't evaluate its argument. You want mylist[[entrylabel]].

> I haven't been able to found my way with R lists, maybe because I'm

> comparing them with perl's hashes.

R lists do have names, but they are not hashes. You can have

duplicate names in different positions in a list.

You can get at list elements by name using $name and [[name]], but the

argument to $ has to be the actual name, not a var containing the


You can also access elements by number using [[i]]

R-project tips website


Red Hat and Intel Macs

Linux Desktop screencasts

LinClips has put together a collection of flash videos which gives a peep into the desktops of different Linux distributions including the menu layout and the softwares bundled with them. What is even better is that each clip runs for exactly 2 minutes which brings it to the reach of people with low bandwidth internet connection.


copy tip - recursively link files

For example:

cp -lR linux-2.4.18 linux-2.4.19

This recursively links the files in one directory to another

bash tip -- sort a large amount of files in a dir by size and do something with them

for myfile in `find $DIR -name "*.ext" -print | xargs du -sk | sort -rn | awk '{print $2}'`


# Do something with $myfile



festival text-to-speech tip

$ festival --tts letter.txt


Emacs perldb gud tip

In OO-perl (also when you have subrutines in a module), one can list the available methods in the debugger with:

S [[!]pattern]


S Socket



Howto set up a Belkin F5D7050 Wireless 802.11g USB Network Adapter under Ubuntu Breezy

tar xzf *gz

cd rt2570*

cd Module


sudo make install

sudo insmod rt2570.ko

sudo ifup rausb0 #(Ctrl+c if you dont get attached to any AP)

iwlist rausb0 scan

sql-mysql mode in Emacs

It gives a mode to query the database in console mode directly inside your Emacs.

Emacs tips - Query replace

Meta-Shift-5 (%) then is like the simple replace but asking each time for confirmation:

SPACE to confirm the replacement

ENTER to skip that case

Rescue Data from Failing Partition

Taken from:

If you have a hard disk drive, or a drive partition that is failing, or if you want to copy data from one partition to another, then ddrescue comes to the rescue!

In case parts of the partition you are trying to rescue data from are corrupt, then ddrescue (unlike dd) skips over it and gets out all the data that is uncorrupted!

Install ddrescue using

$sudo apt-get install ddrescue

Make sure you have a partition with more disk space that the entire partition you are trying to retrieve data from. Yes, that includes occupied AND free space on the partition you are trying to retrieve data from. You can use an external USB Hard drive for that.

Rescue data using:

$dd_rescue /dev/hda1 /some/dir/drive-backup.img

Where you might have to replace /dev/hda1 with the partition you are trying to rescue data from, and /some/dir/ should have more free space than the entire /dev/hda1 partition.

This creates a drive image. You can mount it as a loop device. Do the following to do just that:

sudo touch /dev/loop1

sudo losetup /dev/loop1 /some/dir/drive-backup.img

?If you get an ioctl error, run ?$sudo modprobe loop?, and run the prior command again

sudo mount -t ext3 /dev/loop1 /media/drive-backup

(replace ext3 with the filesystem type of your old partition)

Now you can browse /dev/loop1 and copy out all your data. If you use an external USB drive to backup the image to, you can take the image with you :)


Google defies US over search data

The internet search engine Google is resisting efforts by the US Department of Justice to force it to hand over data about what people are looking for.

The DoJ wants the data to try to show in court it has the right approach in enforcing an online pornography law.

"Online Pornography law"?

To promote it? :-p

AMD gains marketshare

Apparently, AMD (American Micro Devices) has reached the 52% marketshare of CPUs in the desktop computers sold in the USA, in the latest record.

From what I see, AMD has been always trying to reach the level of performance of Intel chips but selling their products way cheaper, or a tad cheaper, than its main competitor.

Being computers something we will be seing more and more often and in more and more places in our lives, price is certainly important. For pockets that are in the verge of entering the digital world, even a small difference in price makes a difference.

AMD is deeply involved in the One Laptop Per Child (OLPC) project. This is, in my opinion, a great "company asset", or whatever it is called in the MBA jargon. Being part of a project that will put a lot of computers into the hands of a lot of childs, anxious to get to know a lot, is really cool.

That said, their Opteron chips, which work great under Linux, are very nice piece of number-crunching... :-)

Internet shopping in the UK

Internet shopping among UK consumers soars almost 50% in the 10 weeks before Christmas, a report finds.

Investigating X41 Tablet and Linux

Scobleizer has been giving some good remarks on the use of X41 Tablet under Windows (he works for Microsoft):

But for those of us who need Linux, there are places where to find information regarding the X41 Tablet and Linux:

Another place where X41 Tablet Linux installation experience is explained:

The on-the-fly screen rotation seems to be working for David.

The rotation protocol is part of the RandR extension in

For a more general introduction on the state of graphics in Linux:

Other people without X.Org have created Rotate layouts in their X configuration files:

Some tips* from the Toshiba Protege m200 help page in

The driver nv from does not support rotation on-the-fly, so nvidia is used which has the option "RandRRotation" set to "true" in the Device section of /etc/X11/xorg.conf. Another advantage is that you gain excellent 3D performance, with the downside that Suspend-To-Disk is broken, when it worked with the old driver. Perhaps it needs more than two hours to properly configure that beast for suspension.

*This information may be outdated with respect ot latest distros/X.Org packages


This is flaming journalism

I don't understand what is the point Mr. Matt Asay is trying to communicate here: "Open Source is getting big, so let's throw some shit on it"?

It seems like so to me...

Raphaƫl Slinckx's gnome invest-applet

This is a new nice gnome applet:

Hopefully it will integrate into gtik and make a one great stock trading applet altogether.


Toxoplasmosis makes me feel like...



# check: mark into squares or draw squares on; draw crossed lines on

# checker: an attendant who checks coats or baggage

# checker: variegate with different colors, shades, or patterns


Directly searching RSite from R -- r-project tip

On a running R instance, type your query like:

RSiteSearch("axis break")

A new browser with pop up with the results of your query.


Howto solve Overfull \hbox warnings in latex [1]

One way is to allow LaTeX to stretch the lines more than usual: Insert something like \emergencystretch=11pt in the preamble. (Unfortunately, this seems not to be possible for single lines/paragraphs only, but is a document-wide setting. This might make the overall typesetting "looser" than usual.)

Frames on images -- latex tip



and with fboxrule one can define some of the characteristics.


A hell of a good paper: "The Origins of Genome Complexity. Michael Lynch and John S. Conery"

This paper, published in Science a couple... oh! wait... three years ago, is a hell of a good one.

An obvious and yet well picked statement:

"The amount of DNA associated with just 30 human genes is equivalent to the entire genome size of an average prokaryote"

which puts a lot of stuff into perspective.

More into the paper, one of the pearls:

"... given that some prokaryotes are capable of cell differentiation, have linear chromosomes, and in rare cases have nuclear membranes, it is unclear whether the relatively simple genomes of microbes are merely reflections of unusual physiological constraints".

An maybe the best piece:

"We argue here that the transitions from prokaryotes to unicellular eukaryotes to multicellular eukaryotes are associated with orders-of-magnitude reductions in population size; by magnifying the power of random genetic drift, reduced population size provides a permissive environment for the proliferation of various genomic features that would otherwise be eliminated by purifying selection"

Well, that doesn't leave much to speculation. Many would agree with it and yet it is not grandly-stated in many places.

To say so in a Dilbert comic sense: "those grumpy guys are getting stuck there in that tiny niche!! [Some million years later] hey! those grumpy guys who were stuck there are now getting kinda bigger and complex..."

iDoom on you iPod Linux/iPod Nano

The best blonde joke ever


Levi makes iPod controlling jeans

... I wonder how would one turn the volume up with these jeans?

Murphy law of the office space

"If you have been having an opened book just at the right of your keyboard during the last weeks or months, annoyingly in the middle of your elbow 'vital space', without ever looking at it during that time, but hoping to do soon, and finally decide to put it aside, Murphy's law says that you will need it just a few minutes later. The time between the moment you finally put it aside and the moment you realise you need it is inversely proportional to the distance or the amount of effort needed to take it from the place you put the book aside."



latex tip -- Hyphens


A hyphen separates the parts of a compound word, like "daughter-in-law". To get one, type "-".


An en-dash is a bit longer than a hyphen, and it used to separate the elements of a range ("see pages 5--7"). To get one, type "--" (two hyphens in a row). (If you really want two hyphens in a row, type "{-}{-}".) Don't use an en-dash to separate compound words, but remember to use en-dashes, not hyphens, for the page ranges in references.


An em-dash is a punctuation mark. (As in: "A specter is haunting Europe---the specter of Communism.") To get one, type "---" (three hyphens in a row); the typographical convention is that there is no space between an em-dash and the surrounding text.

Minus signs

To get a minus sign, which is longer than a hyphen, you need to go into math mode. If you type "-5" in text, the "-" is typeset as a hyphen; you need to type $-5$ (or, if you're using Scientific Word, put the "-5" in math mode).


More on the $1000 genome

The National Human Genome Research Institute, a federal agency in Bethesda, Md. is financing a campaign to cut the cost of sequencing a genome to $10,000 by 2009 and drive it all the way down to $1,000 by 2014. An affordable $1,000 genome is biology's next dream.



Trying performancing

Testing ... Testing ... 1 2 3 ... 1 3 3

Kennedy quits as Lib Dem leader

Since admitting having a drink problem.

I wonder if "drinking problems" are considered an issue in the UK or not. Surely from by point of view, alcohol is much more centered in the UK culture than it is in the Catalan or Spanish culture. But sure enough many young fellows in Spain have drinking problems, specially during the weekends (there is a definition for "botellon" in es.wikipedia, and references in the French and German wikipedias).

It would be interesting to have some stats about how drinking is considered harmful or not in places like Poland, UK or Catalonia.


Bounty County

Bounties for Open Source projects:

interesting acronym for Phd

Where does Google get its pigeons? Some special breeding lab?

Google uses only low-cost, off-the-street pigeons for its clusters. Gathered from city parks and plazas by Google's pack of more than 50 Phds (Pigeon-harvesting dogs), the pigeons are given a quick orientation on web site relevance and assigned to an appropriate data coop.


Batteries tips

Lexing in Perl

The example explained is about SQL statements...


IBEX35 predictions for 2006

The performance for IBEX35 during 2006 is set to 10%, compared to the 18% of 2005.

While in 2005 6 of the best 10 companies where related to construction and real state, 2006 forecast points to banks and telcos.

curl flickr tip -- uploading a bunch of photos

curl -F email='your_login' -F password='your_password' -F photo="@photo.jpg" -F tags="space separated list of tags" -F async=1


shell renice tip using pgrep

pgrep HYPHYMP | xargs renice 19 $1

Comparative Genomics

As of today (well, as of yesterday, but it was Sunday, so I guess that shouldn't count) I'm officially unemployed.


Happy New Year

Enjoy your 2006!


200409   200412   200501   200502   200503   200504   200505   200506   200507   200508   200509   200510   200511   200512   200601   200602   200603   200604   200605   200606   200607   200608   200609   200610   200611   200612   200701   200702   200703   200704   200705   200707   200708   200709   200710   200711   200712   200801   200802   200803   200804   200805   200806   200807   200808   200809   200810   200811   200812   200901   200902   200903   200904   200905   200906   200907   200908   200909   200912   201001   201002   201003   201004   201007   201009   201011   201102  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]