Kudithipudi.Org

May 31, 2009

Places to eat : 90 Miles Cuban Cafe

Filed under: Food,Fun,Travel — Vinay @ 2:29 am

If you are ever in Chicago and looking to get some great breakfast or good cuban sandwiches, try out the 90 Miles Cuban Cafe at 3101 North Clybourn, Chicago, IL 60618. I was looking for a place to get some brunch today and Rich recommended that we go to this cafe. I really liked the decor and the simple menu. The food was visually pleasing and tasty. Here are some pictures of the food (credited to Rich).

Rich’s Lechon (Roast pork, Romaine lettuce, grilled onions, sweet plantain, garlic sauce)

Janvi’s Cuban (Cuban ham, roast pork, swiss cheese, pickles, mustard) 

My Frita Cubana (Cuban hamburger, Romaine lettuce, tomato, shoestring potatoes)

And to top it all.. some Banana pudding

Overheard : Comment about expensive stores

Filed under: Fun,OverHeard — Vinay @ 2:02 am

Comment by my friend, Rich, on expesive stores

Whole Foods = Whole Paycheck

Neiman Marcus = Needless Markup

:)

May 23, 2009

Live and Learn : Collar Stays

Filed under: Fun,Shopping — Vinay @ 9:11 pm

I just discovered that the plastic/metal thingys placed in men’s shirt collars to make them stand up are called collar stays :) . I discovered that during a recent trip to Kohl’s.. Here’s how the conversation looked like

Me : hmm.. you know those things in the collar.. that make them stiff.. you know..those things!!

Clerk : What things?

Me : Well.. those things that are made of  plastic and white in color.. you know…those things.

Clerk : Oh..Sir.. “those things” are called “Collar Stays”

Me : Thank you.. I feel enlightened now :)

BTW.. IMHO.. every gentleman should have some spare collar stays in his kit. And you can get them for cheap on Amazon.

May 22, 2009

HOW TO : Perl subfunction to unmount a partition in Linux

Filed under: Programming,Technology — Vinay @ 10:18 pm

For my record…here’s a snippet of perl code that can be called as a sub function to unmount a partition in Linux.  The magic is in the line “grep m{$mountPoint}, qx{/bin/mount}”, which essentially lets you check if the partition is already mounted or not.

sub UnMountVolume($)
{
    my $mountPoint = $_[0];

    print "Unmounting $mountPoint\n";
	# Check if the mount point exists
	if ( grep m{$mountPoint}, qx{/bin/mount} )
	{
		#Let's try to unmount it
		system("/bin/umount $mountPoint");
	}
	else
	{
		print "$mountPoint is not mounted, so didn't have to do anything\n";
	}
}

As with any perl code, I am sure there are a tons of ways to do this in a more efficient and “cool” way.

{awk} – One Liners

Filed under: Linux,Technology — Vinay @ 6:37 pm

I ran across a cached Google entry for a good collection of awk one liners by Eric Pemant. Since I thought the original site was down, I decided to host it on my domain at http://kudithipudi.org/misc/awk_one_liners.txt. But I did some digging and looks like Eric has his own site now and hosts a lot more resources related to awk at http://www.pement.org/awk.htm. Thx for the great collection Eric..

HOW TO : Find which interface a particular IP address is configured on

Filed under: HOWTO,Linux,Programming,Technology — Vinay @ 3:28 pm

There are a ton of scripts to find how many IP addresses  are configured on a system, but I could not find one, whic would show me which particular network interface an IP address was configured on. Here is a one liner, that will give you this information in Linux

/sbin/ifconfig | grep -B1 10.10.10.10 | awk '{if (NR==1) print $1}'

The same script can be changes a bit to support other operating systems too. Essentially, I am doing a grep (search) of the output of ifconfig, which shows all the network information on the system for a particular IP. At the same time, I am using the -B1 option, which will show the line above the matching line. Finally, I am piping this to awk and printing the first row in the first column.

Travelocity down due to power outage..

Filed under: Technology,Web — Vinay @ 1:31 am

Looks like Travelocity was down early today due to a power outage. Here is a screenshot of the site, right after they came up

According to Pingdom, the site was down for ~1 hour and 29 minutes. If they did come up at an alternate site, I personally think that is a pretty good response time. Running a high transaction web site (and one that is as complicated as Travelocity) is no easy feat and when you throw DR into the mix, it gets pretty nasty. The site is primarily hosted out of the EDS/Sabre/Travelocity datacenter in Tulsa, Okhlahoma.

May 21, 2009

2009 Webware winners

Filed under: Technology,Web — Vinay @ 1:34 am

If you are an Internet junkie like me, here is a list of the 2009 Webware winners.

 http://www.cnet.com/html/ww/100/2009/winners.html?tag=newsLeadStoriesArea.1 .

You will recognize a lot of the names and might also discover some new cool sites.

HOW TO : Pass environment variables when using sudo

Filed under: Databases,HOWTO,Linux,Technology — Vinay @ 12:27 am

Say you need to sudo as a particular user and run a command and at the same time you need to pass an environmental variable to the command, you can do it by passing the command in doublequotes.

For example, I want to start Oracle while I am logged in as another user (vinay), I can start the database using dbstart by issues

"sudo su - oracle -c "dbstart /$ORACLE_HOME"

$ORACLE_HOME is an environmental variable listed under user oracle’s environment.

Needless to say, you need to ensure that you have sudo configured to allow your userID to su to oracle.

May 15, 2009

HOW TO : Block outbound e-mails in Postfix

Filed under: HOWTO,Linux — Vinay @ 7:49 pm

I ran into a challenge at work, where we had to allow e-mail delivery for certain domains, but block all other domains. But at the same time, we had to ensure that the clients sending e-mails did not get a delivery error. We were using Postfix as the MTA running on Redhat Linux. Here’s how I resolved it

  • Edit the main.cf file (the default location is in /etc/postfix) and add “transport_maps = hash:/etc/postfix/transport” (without the quotes) to the file.
  • Create a file named “transport” in /etc/postfix, if it doesn’t exist
  • Add the following at the end of the transport file

DOMAIN1 :
DOMAIN2 :
* discard:

  • Run “postmap /etc/transport” to create a hash of the transport file
  • Run “service postfix restart” to restart the postfix service

This configuraiton will ensure that all e-mails address to DOMAIN1 and DOMAIN2 are delivered normally, but the rest of the e-mails are silently discarded.

Note : Ensure that you follow the syntax for where to place the : verbatim.

Older Posts »

Powered by WordPress