November 10, 2011

Building Emacs 24 on Ubuntu 11.10

You can install emacs24 from the Damien Cassou's repository for emacs-snapshot packages. However, I wanted to try building emacs 24 myself from source. I started off from instructions here and had to install a few additional packages to get all the build dependencies.

# Get emacs source
sudo apt-get install bzr
bzr branch bzr:// emacs

# some dependencies
sudo apt-get install libgtk-3-dev
sudo apt-get install libgif-dev libxpm-dev

# for makeinfo
sudo apt-get install texinfo

# configure complains about missing libtiff
sudo apt-get install libtiff4-dev

# configure and build (WARNING: This is to build with gtk3 as suggested in the original post)
cd emacs
./configure --with-x-toolkit=gtk3

And hurray !

August 8, 2011

Pymongo to connect with Mongolab

Mongolab provides hosting of Mongodb databases including a free plan with upto 240 MB usage. It took a little searching around to find how to use pymongo to interact with a database on mongolab. So here is some demo code for future reference. Tested with Python 2.6 and pymongo 1.7 on Ubuntu 10.10.