The Satyavolu Family Website

Author Archive

Installing MySQL gem on Mac OS X Leopard

Installing the MySQL gem on Leopard was much more painful than I thought. I had the 64-bit version of MySQL already installed. So I had to uninstall MySQL on Leopard, which was a challenge all on its own. Here is what I did (after stopping MySQL, and backing up my databases first, of course):

sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
vi /etc/hostconfig # remove the line MYSQLCOM=-YES-

Then I had to install the 32-bit version of MySQL for Mac OS X. After that is installed, I had to use the following to get the gem to compile:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- \
--with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \
--with-mysql-include=/usr/local/mysql/include

iPhone UI for Rails applications

iPhone - I got the key.

I knew something like this should and would exist – nice work.. Will try and incorporate into the next Rails thing we do!

Slash Dot Dash � Blog Archive � iPhone on Rails – Creating an iPhone optimised version of your Rails site using iUI and Rails 2.


Configuring Gmail as SMTP Relay on Elastix

Elastix uses Postfix, and getting Postfix configured to use Gmail as a SMTP Relay has been incredibly painful to do. This should not be as difficult as it turned out to be, but here is what I had to do to get things working.

Edit the /etc/postfix/main.cf file

nano /etc/postfix/main.cf

Change these lines to your external domain and the name of your elastix server:

################################
#Ingresado por yb-webadmin
mydomain = myrealdomain.gotdns.org
myhostname = elastix.myrealdomain.gotdns.org

Change the following line

#relayhost = [an.ip.add.ress]

to

relayhost = [smtp.gmail.com]:587

Create a new file /etc/postfix/sasl_passwd and put the following line in it

[smtp.gmail.com]:587       loginname@gmail.com:password

Then run the following command

postmap hash:/etc/postfix/sasl_passwd

Create a directory /etc/postfix/certs. Generate a self-signed certificate as follows

cd /etc/postfix/certs
openssl req -new -x509 -keyout cakey.pem -out cacert.pem -days 365
openssl genrsa -out gm.key 1024
openssl req -new -key gm.key -out gm.csr
openssl ca -cert cacert.pem -keyfile cakey.pem -out ./gm.pem -infiles gm.csr

If you get an error that says something like

Could not open directory ../../CA/newcerts

then do the following before you run the commands above

mkdir -p ../../CA/newcerts
touch ../../CA/index.txt
echo "01" >> ../../CA/serial

and after you are done, you can remove the above directory using

rm -rf ../../CA

Add the following lines to /etc/postfix/main.cf

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
 
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/postfix/certs/gm.key
smtp_tls_cert_file=/etc/postfix/certs/gm.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no

And finally run

postfix reload

Check your setup by sending a test email

mail myself@myemail.com

And check the logs for anything going wrong

tail -f /var/log/maillog

How to Choose a Doctor

HouseHaving a child is a exhilarating experience. Dealing with the health system in this country however, evokes the exact opposite emotion. One of the most traumatic experiences we had to revisit with the birth of our child was to pick a doctor, a pediatrician, for him and a OB/GYN for my wife. For myself, it was never really an issue, as I rarely visited the doctor. With a pregnancy and a child however, the doctor is critical, as we are likely to see that person a lot more than our parents :)

So I got to thinking – how do you pick a doctor. What do I look for in a doctor… (more…)


Typing in Indian Languages

Chandamama launches online editions in Indian languagesI have always been interested in typing in Indian languages on computers, but wanted it to be as easy as typing the equivalent in English and have it transliterate dynamically. Alas, due to the complexity of indian languages and the variation in how people type the equivalent in english, it is hard for that method to be reliably correct all the time.

That method however seems to be called RTS by most folks in the know of such things. I created a custom dictionary file for my Pidgin Instant Messenger that lets me type in Hindi by using the Text Replacement plugin. You can just download my version of the dict file and replace the one in the settings directory of your Pidgin installation – and enable the Text Replacement plugin. And voila – you can be typing in Hindi on IM too! And since most IM clients show international characters correctly, the people on the other side do not have to be using Pidgin to be able to see your Hindi. In fact, it works great on gmail’s version of GTalk, and even Fring on the iPhone! Here is my Pidgin Text Replacement plugin Hindi Transliteration dictionary

And to type in Indian languages on my blog, I am using the Indic Input Extension firefox extension. It supports RTS method of input in most languages, but also supports WX – which is very close to RTS, but just uses capital letters for the stronger version of a letter (k is क and K is ख). And it is called WX since only W and X are different than what is obvious – त is w and द is x. The other thing that took me a while to figure out was how to get half characters like त् – the answer is _ – the underscore key allows you to shorten the character just before it. This allows you more control over how the word is displayed. And it allows you to switch between English and the Indian language with just a Ctrl+Space. Beautiful!

In Thunderbird, my email client, unfortunately the above plugin is not available. So I use the Indic IME plugin. The only downside with the Indic IME plugin is that it does not support RTS. So you have to use the WX notation with Indic IME. Since the RTS is kind of unreliable on what it spits out, getting used to WX for Indian languages is probably the best option anyway.

The Thunderbird IndicIME plugin has it limited to versions 2.0a1. I edited the file to make it work on Thunderbird versions that are current. Indic IME Plugin modified for Thunderbird version 2.1

So here is the WX notation in Telugu

Telugu WX notation

Telugu WX notation

And MozDev hosts a version of the Hindi WX notation


The TV Gods look kindly upon BillShrink

The TV Gods are smiling at BillShrink this week. Close to a 100 TV stations across the country have played segments on BillShrink over the last two days. Both CBS and NBC recorded segments on BillShrink. This is the first time the TV stations have profiled the company directly, as opposed to previous segments that focussed on some of the products that we happen to have built some expertise on. CBS 5 ran the segment on the 6 o’clock news today. You can see the video below.

http://www.satyavolu.org/wp-content/uploads/2009/01/schwark_cbs.flv

And NBC ran another story on the 11pm news. The video for that is below

http://www.satyavolu.org/wp-content/uploads/2009/01/schwark_nbc.flv

Protected: Painting a baby room

This post is password protected. To view it please enter your password below:



Social Networking in a box

communities already existI have been looking for a while for a bunch of social networking functionality to use out of the box – it is ridiculous that you have to build all the same basic things over and over again. I think I found exactly what I was looking for – Community Engine can be used as is, but is designed as a plugin as opposed to as an application. Very nice. One of these days, I might actually try it out. Now this is the kind of stuff that makes it harder to go with Django – community is more vibrant on the Rails side.

Community Engine – Documentation.


Protected: What’s in a name?

This post is password protected. To view it please enter your password below:



Protected: The Search for a Stroller

This post is password protected. To view it please enter your password below:



Protected: Baby Shopping Starts

This post is password protected. To view it please enter your password below:



Hello world!

Welcome to the new and improved Satyavolu Family Website. I decided to call it Rajahmundry, after the ancestral town from which the Satyavolus hail. This website will now be regularly updated as a blog with both public and private posts. Happy New Year everyone!