Skip to content

The Plan

One of the things I have always dreamt of doing is bike in Europe. Like a real bike ride. Since I’m going soon, I thought I’d bike from my Pritham’s (cousin) place in Amsterdam to Viren’ (also a cousin) at The Hague. Using the LF network. It’s about 82K, which is a nice healthy 50 mile ride. Can’t wait.

bike-route

H.

Craig Thompson Video

Download Video: WebM

H.

Lemon Pepper Salmon

Ingredients:

1 ) Salmon – 1 lb
2 ) Garlic – 3 pods, finely diced
3 ) Lemon Juice – 1 tsp
4 ) Parsley – fresh, 1 cup, finely diced
5 ) Olive oil – 2 tsp
6 ) Basil – powder, 1 tsp
7 ) Pepper
8 ) Salt

Method:

1 ) Put the lemon juice, parsley, garlic, basil, salt and one tsp of olive oil in a bowl and mix.
2 ) Cut the salmon into portion sizes (1 pound should give you 4-5 pieces) and drop it into the marinade.
3 ) Put in the fridge for an hour.
4 ) Pre-heat the oven to 190C (375 F).
6 ) Take a shallow tray and coat it with 1 tsp olive oil.
5 ) Once, the marination is done, take the fish out, and place it in the shallow tray.
6 ) Cake the top of every piece of fish with ground pepper.
7 ) Bake for 45 minutes.

H.

I made this yesterday. It was very good. I tried salmon and tuna, and noticed that it’s way better with salmon.

Craig Thompson

Last night, I went to a talk by Craig Thompson. Craig is another artist that I go nuts over. His latest book, which was also the subject of the talk, is THE most exquisite comic art you will ever see. Habibi, the book, is a timeless story of two slave orphans trying to survive in a cruel world. It mixed the ancient and the modern, good and evil, and all along, walks on the line that joins the three religions of the Book – Judaism, Christianity and Islam. I can read Arabic, so some of the art and calligraphy were familiar to me. I was surprised to find out that Craig can neither read nor write the language, so the effort is even more extraordinary.

After the talk, which I recorded and will post online, he took some questions from the audience, and then signed books. He was gracious to sign all my books and even did a bit of custom art in all of them. He asked about me and about Rashmi (he was fascinated with her name), and why we stayed in different countries (It looks like the comic artist community are a very nice bunch because even Guy asked me last week). I asked him about Habibi and about Blankets, his other opus. Blankets is a mostly autobiographical story of first love. It is, by a mile, the most profound book I have ever read.

To me, the holy trinity of comic book artists alive today is Joe Sacco, Craig Thompson and Guy Delisle (Bill Watterson, Alan Moore, Oderzo, Sarah Glidden etc get honorable mentions), but it’s now official. Both Guy and Craig said that Joe was the God. I kid of agree.

Before I forget, Craig’s talk was a part of the exhibition at the Skirball, called “Women Hold Up Half The Sky”, which was inspired by Nick Kristoff and his wife Sheryl Wudunn. The sheer amount of work they do to highlight and alleviate the suffering of women around the world has to be seen to be believed. I’m yet to understand how the Nobel peace prize committee ignores them.

H.

Guy Delisle Video

Here’s the video I took.

Download Video: WebM

H.

Hoshi Toru

I’m currently reading “The Making of Modern Japan”, which is this massive book that takes you through the story of Japan from the rise of the Tokugawas, all the way through to the 90′s. I’m only half the way through, and some of the material is moribund, but every once in a way, you come across a pearl. Today’s was on Hoshi Toru. Hoshi Toru was the speaker of the Diet in the early years of the Meiji restoration (the whole concept of a parliament was new) and the members of the parliament wanted to oust him. So, they send a letter to the Emperor asking that he have him removed. Unfortunately for them, Hoshi Toru was the protege of Ito Hirobumi, Japan’s first prime minister, and an all-round genius. To managed to manipulate the Emperor to reply to the letter asking whether the letter was sent by the parliament to apologize for them electing Hoshi as speaker, or to resign due to the shame of such an error. Cornered, the parliament conceded to Ito and Hoshi.

H.

USCDR Promo Video

H.

Guy Delisle

Guy Delisle is my favourite comic artist. I have followed him for years and have a few of his books. He started out with simple animation style books. During a trip to Shenzen, he drew a few scenes and published it in a paper, and when the readers asked for more, he decided to expand that into a book. The first of his travelogues was born. Since then, he’s done one on Pyong Yang, where he managed a team of animators for a few months, Burma, where he lived for a year, and recently Jerusalem.

I met with him yesterday at his book reading at Sky Light Books (amazing store in Hollywood btw), and was pleased to find out that he was exactly like he portrays himself in his books. Calm, down-to-earth, inquisitive and an all-round great guy to share a beer with. He not only signed my Jerusalem book, but signed all my other books of his, and put in his custom art. He asked me where I was from, about Rashmi, and when I told him about Calgary, he asked me what I was going to do about the situation :)

At the reading, he went through a slide show on how he works, what he looks for, and towards the end, he showed a lot of sketches that he made in Jerusalem, and said that it’s probably going to come out as a book soon.

I took a video of the whole event (on the iphone), but it’s 10GB, so I’m trying to figure out how to post it somewhere. Since it’s one hour long, most sites won’t work.

Guy’s homepage is : http://guydelisle.com/

If you haven’t read any of his books, leaf through them the next time you go to a book store. It’s in the style of a comic or a graphical novel, but it really is some of the best travel writing out there.

H.

Raghu Dixit

I’m missing Rashmi today.

Raghu Dixit is amazing. I first saw him perform on BBC the other day (I’m In Mumbai, Waiting For A Miracle – super song, it’s on Youtube).

H.

Shikha and Rohit

Shikha and Rohit

Shikha and Rohit came for the weekend. I hadn’t seen Shikha in a decade. The three of us had fun. Lots of driving, sightseeing, alcohol and old stories. Wish old friends came more often.

Rohit is a rockstar in the Indian IT scene. He co-founded DimDim and oversaw it’s acquisition by Salesforce.

H.

DTrace Conference

Was in San Francisco for the DTrace Conference on Tuesday. It was held at the Children’s Creativity Museum in downtown. Pretty much 90% of the people in the world using DTrace in on that carousel. And yes, due to the propensity of geeks to be fat, w had to push the carousel to start it!

H.

Renaming a Million Files

Yesterday, I saw a tweet by a veteran admin complaining that the candidates he interviews these days can’t code up simple scripts. Intrigued, I asked him what he considers simple, to which he replied that he asked a candidate to rename a million files on JFS2 on a SAN.

Today, after work, I thought I’ll see what I would do if I were asked the question. I came up with 3 quick ways to do this, but since I don’t have a san running JFS2, I tested this on my mac.

I assumed that we are changing the extension of the files in the directory. The real use case may differ, but the approach will be the same. I didn’t create a million files either. Just 100K.


moosha:testdata$ time for i in {1..100000} ; do touch $i.abc ; done

real 9m40.692s
user 0m41.439s
sys 8m56.233s

Method 1:


ls * | awk -F. '{ print "mv "$0" "$1".wmv" }' | sh

As soon as I wrote this down I knew that ls would break. So I modified it –


echo * | awk -F. '{ print "mv "$0" "$1".wmv" }' | sh

Turns out that mv breaks as well. Ok, no worries.

Method 2:

This method I knew would work.


for i in `echo *` ; do mv $i "${i%.*}".wmv ; done

It did, but


moosha:testdata$ time for i in `echo *` ; do mv $i "${i%.*}".wmv ; done

real 20m3.923s
user 0m48.597s
sys 19m15.824s

So it took 20 min. Hmm. Surely, we can do better. Ok, perl it is.

Method 3:

I hacked an old perl script (because I was lazy to start from scratch)


#!/usr/bin/perl

# Program that renames files in a directory.

use Cwd;
use File::Copy;

my $startdir = cwd;
my $rendir = $ARGV[0];
my $newext = $ARGV[1];

if (($rendir eq '') || ($newext eq '')) {
print "You need to specify a directory.\n";
print "Usage : perl file_rename.pl \n";
exit 0;
}

print "Going to rename files in $rendir. Are you REALLY sure? (Y/N) : ";
my $a = ;
chop $a;
print "\n";

while ($a eq "Y") {
chdir $rendir or die "Can't get into the directory : $rendir";
opendir my $DIR,'.' or die "Can't open the directory : $rendir";;
while (my $n = readdir $DIR) {
if ($n ne '.' && $n ne '..') { #Ignoring current and parent directories
#mv $n "${n%.*}".wmv
my ($head) = $n =~ /(.+?)(\.[^.]*$|$)/;
move ($n,"$head.$newext");
}
}
closedir $DIR;
chdir $startdir or die "Can't get back to starting directory : $startdir\n";
$a = 'N' ;
}

And running that,


moosha:code hriday$ time ./perl/file_rename.pl testdata wmv
Going to rename files in testdata. Are you REALLY sure? (Y/N) : Y

real 14m7.924s
user 0m5.918s
sys 13m52.067s

Cool. I shaved 7 minutes in perl. I’ll use this method.

Experiment over. Next week, I’ll set up a SAN with JFS2 and test again. In the next few weeks, I am going to install 4-5 filesystems on that SAN and benchmark them. One of the tests has got to be renaming files.

H.

LVM and Large Disks

I don’t do this often enough, and I have a terrible memory, so I’m going to commit this here.

Today, I needed to create an xfs file system on a linux server. The disk was attached over iscsi, and was presented as multiple raid arrays, each array greater than 2TB. So, the way to deal with this is to use GNU’s parted tool, and create a GPT label. The built in fdisk can only do EFI and that’s not going to cut it here.

For each raided disk :

# parted /dev/sda
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? YEs
(parted) print
Model: NEXSAN SATABeast2 (scsi)
Disk /dev/sdg: 16.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags

(parted) unit TB
(parted) mkpart primary 0.00TB 16.00TB
(parted) print
Model: NEXSAN SATABeast2 (scsi)
Disk /dev/sdg: 16.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 0.00TB 16.0TB 16.0TB primary

(parted) quit
Information: You may need to update /etc/fstab.

Ok, that’s done then. Now, to work on the LVM. There’s an excellent howto in the references section below, but here’s the basic commands I use :

# pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1
# vgcreate vg_photographs /dev/sda1 /dev/sdb1 /dev/sdc1 <--- vg_photographs being the volume group name
# lvcreate --name lv_photodisk --size 40T vg_photographs <--- lv_photodisk being the logical volume name. Also, 40TB is the size of all raid disks combined

Now, we create an xfs file system :

# mkfs.xfs /dev/vg_photographs/lv_photodisk

# mount /dev/vg_photographs/lv_photodisk /mnt/photos

Anddddd, done.

Now, to extend the file system because 40TB just isn't enough for your photos. Do the parted thing again for the new disk :

# parted /dev/sdd

And the LVM pieces too :

# pvcreate /dev/sdd1
# vgextend vg_photographs /dev/sdd1

Now, run :

# vgdisplay --verbose

And from the output, add up all the X and Y pieces :

...snip...
Total PE / Free PE X / 0
...snip...
Total PE / Free PE Y / Y
...snip...

The total space of the disk is going to be X+Y

# lvextend -l 40060959 /dev/vg_photographs/lv_photodisk

And finally, grow the file system :

# xfs_growfs /mnt/photos

You can do a df to check but it should be pretty good at this point.

H.

Ref :

1) Linux LVM Howto
2) Growing XFS in LVM
3) GNU Parted

Picking Up Women, Dutch Style

[youtube]http://www.youtube.com/watch?v=8vgF_vvb6Dw[/youtube]

First I thought it was Rums. But Pritham won’t even ride a bike like this, so it can’t be her.

H.

Chicken Fry

Ingredients

1 ) Chicken – 2 kg
2 ) Garlic – 4 cloves
3 ) Ginger – small piece
4 ) Dry Red Chilli – 4
5 ) Shallots – 10
6 ) Turmeric – 1 tsp
7 ) Chilli Powder – 2 tsp
8 ) Pepper – 1 tsp
9 ) Vegetable Oil – 3 cups
10) Curry Leaves – 15 leaves

Method

1 ) Cut the chicken and rub it with fresh lemon juice.
2 ) Grind the shallots, ginger, garlic and red chilli into a paste, and rub it on the chicken.
3 ) Add salt, pepper, turmeric and chilli powder.
4 ) Marinate for 30 minutes.
5 ) Fry in vegetable oil.
6 ) Take the chicken out.
7 ) Take 4 Tbsp of the that oil and fry 2 cloves garlic, and three medium onions, a little ginger, and some green chillies.
8 ) Once the onions are fried, add the chicken back along with some curry leaves, and roast it again.

From a recipe shown on TV.

H.

Tuthukudi Meen (Anchovy Curry) Kozhambu

Saw this on TV today. Thought I’d jot it down because I want to try this soon. It has to be made in a clay pot (Cheena chatti – Chinese vessel)

Ingredients :

1) Tamarind pulp – 1 lime size
2) Coconut shreds – 1 cup
3) Chilli powder – 1.5 Tbsp
4) Corriander powder – 2 Tbsp
5) Cumin powder – 1 Tbsp
6) Shallots – 6
7) Turmeric powder – 1 Tbsp
8 ) Mustard seeds – 1 Tbsp
9) Anchovies – 0.75 kg/1.5 lb
10) Tomatoes – 1, diced
11) Chillies – 3, cut length wise
12) Mango – 1 small, cut julianne
13) Garlic – 6 pods
14) Sesame oil – 2 Tbsp
15) Curry leaves – 1 handful
16) Fenugreek seeds – 1 pinch
17) Salt – 1.5 tsp

Method :

1) Take a lime sized tamarind pulp and put it in about a cup and a half of warm water. After about 5 minutes, take the pulp out and pour the water into the clay pot and put it on the fire, medium heat.

2) Put the coconut shreds, corriander powder, chilli powder, cumin powder, 3 shallots and the turmeric powder in a blender and make it a paste. Put that paste into the tamarind water. Stir for a minute or so, and taste the mix. It should taste a little sweet. If not, something’s off because the sour and the spicy components should combine to make the mix a little sweet.

3) Let the mix boil. When it’s boiling for about 5 minutes, add the fish, and then add salt. Don’t put the salt on the fish because this fish absorbs salt, so it’s better to add it to the curry.

4) Keep on the fire for another 10 minutes.

5) Add the tomatoes, chillies and the mango.

6) In another vessel, fry the mustard, fenugreek seeds and 3 shallots in the sesame oil. When the oil is really hot, add the curry leaves.

7) Crush the pods of garlic and add it to the curry.

8 ) Add the fried items to the curry.

9) Keep in low heat for about 30-40 minutes, and then keep aside for a few hours. The curry tastes best after a few hours.

H.

What a Plan

I’m not much of a gamer, but you don’t need to be one to appreciate this.

[youtube]http://www.youtube.com/watch?v=FOaGhE_sejI&feature=share[/youtube]

H.

Bitchin New Song

Why this Kolaveri di?

[youtube]http://www.youtube.com/watch?v=YR12Z8f1Dh8[/youtube]

H.

A Birthday and a Death

On Papa’s birthday, a dear friend’s dad passed away. Joe, Matt, Leo, Tykes and Okasan, I sorry for your loss. The cedar tree may have fallen, but it’s fragrance will endure.

H.

Bike Share Program in Bangalore

[youtube]http://www.youtube.com/watch?v=ms-haFOP6b4[/youtube]

Just super. I really hope these guys succeed. I just talk the talk, but these guys are walking the walk.

More here

H.