|
|
Here is a trick to to create a comma delimited file from oracle. You can create a csv file simply using SQL*Plus with any sql statement. Here it is -
set feedback off
set heading off
set underline off
set colsep ','
spool /path/to/file/mysheet.csv
select * from table
spool off |
Here are some other ways I found online
http://kpanchan.blogspot.com/2007/05/extract-csv-file-format-in-oracle-sql.html
http://www.oracle-base.com/articles/9i/GeneratingCSVFiles.php
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:68212348056
It is easy to send a text file as the body of an email from UNIX. You can do it using the command below -
mail -s "Email with file as body" email@domain.com < message.txt |
Now if you want to send a file as an attachment, you would need to use uuencode piped to mail. This file can be a binary file or a text file. The command is
uuencode file.dat file.dat | mail -s "Email with attachment" email@domain.com |
Suppose you want to send an email with a body and an attachement. Here is the trick –
First create the attachment file by using uuencode. Then join the message file which is the body of the email along with the uuencoded file which is going to be an attachment by using the cat command.
uuencode file.dat file.dat > attachment.txt
cat message.txt attachment.txt > combined.txt |
Now all you need do is to send the email using the first method shown here
mail -s "Email with message body and attachment" email@domain.com < combined.txt |
Chicken 65 – Any Hyderabadi’s favorite dish! Well, I guess maybe after the hyderabadi Biryani I dont want to start any holy wars here but today my post is about Chicken 65. A lot has been talked about this dish’s origin which can read on wikipedia. I believe Sanjay Thumma from vahrehvah.com got it right by saying this chicken dish was the 65th item on a menu. As popularity rose in the restaurant, it started being called Chicken 65.
I was browsing the internet the other day and came across a friends photo blog of his recent visit to India on facebook. Being a self proclaimed foodie, watching the slideshow was very torturous, but it got some really good memories of places to eat in New Delhi and Hyderabad. I thought the best way to deal with this would be to cook this dish. I called my cousins and we decided to meet up that day. I offered to make chicken 65 as an appetizer and my cousin offered to make spaghetti in a turkey meat sauce(yum) for dinner. Ultimately I was very glad with the results of my dish. I think this has been my best attempt so far in making this dish. Here is the recipe -
Ingredients
Boneless skinless Chicken thighs -3 pounds
Green chillies – 5-6 slit and the cut in half
Ginger – grated 3-4 tsp
Garlic- grated 3-4 tsp
Curry leaves -10-15 leaves
One egg
Corn starch – 4-5 tsp
2 cups yogurt
Spices
Salt – according to taste
Pepper – 1 tsp
Deghi mirch – 3 tsp
Lal mirch – 3 tsp (depending on how spicy you want it)
Garam masala – 1.5 tsp
Haldi – 1/2 tsp
MSG – 1/2 tsp
Method
Cut chicken in small cubes
Marinate chicken for an hour in salt, pepper, deghi mirch 1.5 tsp, lal mirch 1.5 tsp, .5 tsp of MSG
Mix the chicken in the marinate and while mixing add an egg to the chicken and then mix in corn starch
Whisk the rest of the spices in yogurt and keep aside
Fry the chicken and make pakodas and keep aside
Add 2 tbl spoon of oil in a wok, heat and then add Mustard seeds – Add Ginger, garlic, green chillies and curry leaves.
Once a little brown and dry, add the fried chicken and mix it well
Add the whisked yogurt
Cook till yogurt is dried up
Here is what it looked like after the pakoda’s were made -
 Chicken Pakoda (Fried Chicken)
Here is the finished product -
 Chicken 65
The reason this does not look red in color was because I did not use any food coloring.
Enjoy
I have been thinking about cooking chicken a little differently than what I have normally been making lately. Lately I cook it with a south Indian flare as that is how my wife, me and my brother like it. You can find the recipe for the south indian spicy chicken curry here. The end result looks a little like my other curry but the taste is very different.
 My interpretation of the north Indian Adraki Chicken
My memories of adraki chicken are from Nagpur. We used to go to this restaurant called Sanjha Chulha in Sadar. They called it ginger chicken and it was so so good. One would think seeing the name that it is a Indo-chinese dish… but it was a very tasty north Indian dish. Me and my friend would get a dish each and finish it all
Here is my attempt -
Ingredients:
chicken thighs- 1.5 pounds
onions 3 small chopped
1 larger tomato – chopped
fresh ginger/garlic paste 6 tsp
2 tsp grated ginger
1 tsp jeera
3 green chillies sliced
3 tbl spoon ghee
Marinate for an hour:
fresh grated pepper
deghi mirch
salt
lime juice
garam masalla
3 tsp ginger garlic paste
Method:
1. heat ghee in a kadai
2. add green chillies. take it out once slightly cooked
3. Add a tsp of jeera
3. Saute onions in the ghee. Add half a tsp of salt to speed up browning of the onions
4. After carmalising, add 3 tsp of ginger garlic paste and the green chillies.
5. add all the masalas
6. Add tomatoes.
7. Cook to make a nice consitency
8. Add the marinated chicken. turn the chicken around in the masala and partially cook to get some white in the chicken.
9. Add a glass of water
10. Add 2 tsp of kasoori methi
11. Add 2 tsp of grated ginger
12. Reduce flame and cook covered for 5 minutes. Mix the gravy and chicken a couple of time and make sure the masala does not stick.
13. Taste to make sure salt is right.
Hope you enjoy it as much as we did
I was trying to open the xampp home page today on my dev box and I got the following error -
Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\xampp\index.php on line 2
I initially thought I had corrupted my install, but just for the heck of it, I thought I would google the error and see if anybody had a similar error. Good thing I tried… I would have wasted a lot of time, reinstalling and enabling eclipse debugging with xampp. I remember I had to go through hoops to get that to work. I will post an article soon on how I did it.
Well the reason my xampp home page stopped working was because the lang.tmp file got deleted somehow. Use the link “http://localhost/xampp/lang.php?en” to recreate this file. You should have a working xampp home page again.
The comment symbol for Unix scripts is typically “#”. You can use the same concept for files for other programming languages. My vi commands below use the “#” symbol.
If you want to comment 5 lines in a file -
- Go to the first line you want to comment
- Make sure you are in the command mode. (Hit ESC).
- Now type the following “:.,+N-1 s/^/#/g”, Where N is the number of lines you want to comment. In this case it would be
You can also comment till a unique word in a file. For instance here is a snippet of a file -
line one
line two
line three
line four
line five |
Suppose you want to comment from line two till line four. Go to the beginning of “line two” and type the following after you are in the command mode
I currently have hosting through bluehost.com. I was surprised to see all blog notification emails were coming from username@boxXXX.bluehost.com instead of the email address defined during setup. After a lot of searching online and trying out different things, I think this bug is due to a combination of my hosting company bluehost and wordpress. I found a couple of ways to fix this -
- Use an smtp plugin to define the Sender email. You can search for them on wordpress.
- Create a wordpress@mydomain.com email address where mydomain.com is the domain where you are hosting wordpress. This is the default email address used by wordpress which is hard coded in the wordpress code. This is used when wordpress can’t figure out the admin email address.
- Modify the php.ini from your bluehost cpanel to have a default email address. The reasoning behind this is that wordpress uses the php mail() function and you are defining the sender in the php settings file. By modifying this, you are defining the default email for all youu php based sites. Modify the variable to appear like the following:
sendmail_path = “/usr/sbin/sendmail -t -i -f’myemail@mydomain.com’ “
- Dig into the wordpress code and set the email address to your desire.
There are pros and cons on each method. Going the plugin route is the easiest way, but the con on that method is that if one looked at the header of the email, they would see the ugly bluehost email addres.
Creating the wordpress@mydomain.com address is also another easy way to fix this. The con on this method is – If you have multiple wordpress installations you only get one default admin address to share between the two install. I didn’t want that. That’s also why the third option wouldn’t work for me.
You know me, I went with the 4th option
You need to edit the file /wp-includes/pluggable.php located in your wordpress installation.
Search for this code snippet
if ( !isset( $from_email ) ) {
// Get the site domain and get rid of www.
$sitename = strtolower( $_SERVER['SERVER_NAME'] );
if ( substr( $sitename, 0, 4 ) == 'www.' ) {
$sitename = substr( $sitename, 4 );
}
$from_email = 'wordpress@' . $sitename;
} |
and replace with the email address of your choice. e.g. myemail@mydomain.com
/*if ( !isset( $from_email ) ) {
// Get the site domain and get rid of www.
$sitename = strtolower( $_SERVER['SERVER_NAME'] );
if ( substr( $sitename, 0, 4 ) == 'www.' ) {
$sitename = substr( $sitename, 4 );
}
$from_email = 'wordpress@' . $sitename;
}*/
$from_email = 'myemail@mydomain.com'; |
in the same file, look for
$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); |
and replace with
//$wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
$wp_email = 'myemail@mydomain.com'; |
That’s it!! Now all your notifications will go from myemail@mydomain.com instead of the ugly username@boxXXX.bluehost.com. If anybody knows of a better way to do this, do let me know.
If you have a lot of applications in your iphone, you know how long it can take to sync your iphone with itunes. It needs to first backup the iphone and then sync. It is more aggravating when you just want to put sync that one album or podcast for your train ride to work! It turns out, you can easily disable that feature. Of course its not an option you can disable or enable in itunes. I wish that were the case. People have written programs to do that. All it does is update the %appdata%\Apple Computer\iTunes\iTunesPrefs.xml file with the instructions on not to backup. If you want to enable it again, you have to remove those instructions. One third party app which does that is call Backoff. It can toggle this setting on and off.
Just in case you want to do this yourself, here are details on how to do it -
- Locate iTunesPrefs.xml by going to Start->Run and typing %appdata%\Apple Computer\iTunes and hit OK.
- Backup iTunesPrefs.xml
- Open iTunesPrefs.xml and search for <key>User Preferences</key>
- Under the next <dict> add the following:
<key>DeviceBackupsDisabled</key>
<data>
dHJ1ZQ==
</data> |
- Save your changes and restart iTunes. Auto-backup is now disabled.
I was writing a blog post on a myeclipse bug (is this really a bug?) and saw that the code I was trying to display on my blog was not rendering correctly. Part of the code got hidden and the formatting of the entire page looked really bad. I have seen websites which show code boxes which show code in their blogs.. so started my search for a good plugin. I found WP-CodeBox and have loved it so far. Go to the WP-CodeBox home page for details. You can see it in action here.
I was watching the travel channel the other day and saw this adventure resort. This place looks sooo good. You can do whitewater rafting, paint ball, zip lining, ATV riding, horse back riding, mountain climing and a good obstacle course. Its the perfect place for some adventure and fun!! link
|
|
Recent Comments