Satya's blog - 2007/11/

Nov 21 2007 10:50 Fingerprints

Well, I got fingerprinted yesterday. No, aside from the "we track y0u" aspect, this is a good thing. I'm not in trouble (in this context, anyway). The rest of this post is cobbled together from chat. It was fast. My appointment time: 12. My actual departure time: ~11:40. Yes, it took less than an hour, and they were flexible enough to accept me as soon as I arrived rather than "sheet says 12, you wait outside the building till 12".

It took some effort as my fingers are crooked. It was quick -- there was no one there. Well, one family but they were doing something else. And holy cow the guard was friendly and polite, and so was the lady doing the fingerprinting. I didn't get tasered at all. And they did not want ridiculous information like "all the addresses you've ever stayed at, ever, including one-night hotel rooms". Just the basic name address dob ssn hipaa-bait, plus ht, wt, inseam, shoe size. Well not even the last two.

Nov 12 2007 10:52 bash and tcsh colors

To set colors in tcsh, and in bash for that matter, and possibly other shells as well, use this:

echo ESC[0\;42\;30m

Replace ESC with a literal escape, usually achieved by ctrl-v followed by the escape key. The first number, 0, sets attributes like bold, etc. The second number, 42, sets the background color. It is optional, you can as well do "0;30m" instead of "0;42;30m" as I have above. The semi-colons (;) are escaped with backslashes (\). The third number, 30, is the foreground color. You echo again with all the numbers set to 0 to get the "normal" colors. (Actually, it is enough for the last number to be 0.) The codes are:

First number:
0 - normal
1 - bold
2 - normal again
3 - background color
4 - underline the text
5 - blinking

Foreground colors (3rd number):
30 - black
31 - brick red
32 - green
33 - yellow ochre
34 - dark blue
35 - magenta
36 - cyan
37 - white/gray

The background color code is same as the foreground coe, with 10 added to it. Background of red can be achieved with code 41.

Cribbed from http://www.nparikh.org/unix/prompt.php, but I like to think my explanation is clearer. That site tells you how to embed the codes into a prompt string.

Nov 06 2007 11:58 Mutt and Ubuntu indexer

Okay, here's a good one. I use mutt with local mbox folders, some of which are also my incoming folders (via fetchmail's IMAPS and procmail). Ubuntu Gutsy Gibbon (7.10) ame along, and I stopped seeing new mail in the folders.

That is, I used to start mutt and be in the inbox. Hit c, and the "Open mailbox" prompt had the next folder with unread mail filled in by default. Hit enter, and I go to the next incoming folder with unread mail. Now, I was getting no folder filled out, which means mutt thinks I have no un-read (new) email.

Mutt relies on mtime and atime to tell which folders have new mail (contrast "read" mail and "old" mail). Gutsy Gibbon's trackerd, the file indexer, was messing up the timestamps. Kill the tracker, mutt sees unread mail again. Since I don't use nor like OS-level file indexers, I can live with this.

Tag: geeky