Srini's Point of View

My thoughts on technology, food and other fancies…

Send Email In Python Bugfix

I have been using this python function for a while to send html emails from within my python scripts -

def sendhtmlemail(emailbody, subject):
    """ Send html email with given subject and body """
    fromaddr = readconfig(EMAIL_FROM)
    toaddr = readconfig(EMAIL_TO)

    msg = MIMEMultipart('alternative')
    msg['From'] = fromaddr
    msg['To'] = toaddr
    msg['Subject'] = subject

    body …

Lost SSH During Ubuntu Update

I was trying to install security updates on my digitalocean vps and lost my ssh connection. The one time I was not using tmux! GAH!! It was also stuck at a stage where it was waiting for me to put in what config changes to use for some software package …

How to install MongoDB on a Mac

I am starting to teach myself the MEAN stack. The MEAN stack makes use of MongoDB, Express.js, Angular.js and Node.js. The best part about this stack is that all parts of the stack can be written in Javascript. Read this wikipedia article to know more.

The best …

How to install npm packages on osx without sudo

One of the best features of python is how you can have project specific python environments using virtualenv. That way you are not putting any python packages in the global area. I knew I wanted to do something similar for managing and installing npm packages. Basically I did not want …

Pindi Chole

This is my aunt Leela Mangu’s special pindi chole recipe.

Boil 2 cups Chana with 2 tsp ground tea leaves, 2-3 Laung, 2 tsp amla pdr, salt.

Fry in oil 1 inch ginger, some garlic till brown, add 2 small tomatoes chopped to small pieces. Add Haldi, little jeera …