Persistent storage for Amazon EC2 with EBS

Last week (20th August) Amazon Web Services released Amazon Elastic Block Store (EBS). Amazon EBS provides block level storage volumes for use with Amazon EC2 instances. Amazon EBS volumes are off-instance storage that persists independently from the life of an instance. Amazon Elastic Block Store provides highly available, highly reliable storage volumes that can be attached to a running Amazon EC2 instance and exposed as a device within the instance. Amazon EBS is particularly suited for applications that require a database, file system, or access to raw block level storage.

This is a follow up to my posting, http://blog.mohanjith.net/2008/02/amazon-ec2-with-rock-solid-persistent.html. The method described there is obsolete with the release of Amazon EBS. None the less you can place the jail file system inside the EBS block device and not worry about having to build AMIs from time to time.

Hope this information helps someone.

BlueProximity

BlueProximity is a cool GNOME application that detects the proximity to a Bluetooth device to determine whether the user is in proximity. If the user is way the screen will be locked (or any command be run), when the user is in proximity the screen will be unlocked (or any command be run).

However if the screen is manually locked it will not be unlocked because the Bluetooth device is in proximity. Should the screen be locked because the Bluetooth device is away, you can manually unlock the screen.

Blueproximity allows you to secure your machine while not going through the inconvenience of locking the screen when you are leaving the machine and then unlocking it when you are back. BlueProximity, Leave it – it’s locked, come back – it’s back too…

Using Nokia N70 to connect to internet with Ubuntu 8.04

Recently I bought a Nokia N70 Music Edition. It was mainly for internet on the go; to check mail, browse the net, receive and make VOIP calls. Just to see whether it would work, I tried to connect to internet via 3G using the N70. To much to my delight I was successfully connected to internet without any issues using the GNOME network applet/admin. I have a Dialog Broadband connection, and download speeds were in the range of 25KB/s-40KB/s, pretty good on WCDMA 2100. Best part of all was that I didn’t have to touch the command line. So all not so technically inclined folks can make it work as well without glitches.

Bellow you will find the steps. Please make sure you can browse the net with the phone to make sure you are in a service area ;).

Step 1

Connect the phone to the PC. I used USB but Bluetooth is reported to be working on Ubuntu 8.04 as well.

Step 2

Start the network admin application (System -> Administration -> Network), you’ll have to unlock it if you are not root (most likely you are not).

Step 3

Select “Point to point connection” and open up the properties.

Step 4

In the General tab make the following changes. Check/select “Enable this connection”. Select GPRS/UMTS as the Connection type. Set the Access point name to what’s provided by your service provider (In my case it was www.dialogsl.com). Under account data put your username and password provided by your service provider if any.

Step 5

In the modem tab select/type in the correct modem port, in my case it was /dev/ttyACM0. If it doesn’t work for you, plug the phone usb cable while monitoring /var/log/messages, you can see where the phone is being mounted.

Step 6

Save the settings by pressing Ok, then activate the connection by checking the check box against “Point to point connection”.

That’s it, now you should be connected to the internet via 3G if there is coverage in your area or else via GPRS. Hope you will find this post helpful.

SVN Commit messages from the author

I was given the task of altering a SVN commit message hook(mailer.py) to send the messages as the author. The box was running Debian Etch, looking at the mailer.conf file I couldn’t figure out how to do that. There was no documentation that I could find.

Finally after much head scratching and searching I figured out that %(author)s situation variable can be used in from_addr. It was confirmed by http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/mailer.conf.example.

Hope this will come in handy for someone trying to do the same.

Ping Bloglines – Poll-n-Ping! exclusive

Bloglines is the latest service to be added to the list of services Poll-n-Ping! can ping. None of the multiple ping services that are out there has the ability to ping Bloglines. This brings the total number of services Poll-n-Ping! support to 20.

Some multiple blog ping services (e.g. Pingoat)  have ping servers that are no longer existant. We at Poll-n-Ping! continuousy monitor the upstream ping services to ensure that they are live. We are also believe in being transparent, hence provide you will the result of each ping we make.

We are constantly trying to increase the number of services we ping. Do not forget to check your Poll-n-Ping! account regularly for the latest additions. If you do not already have a Poll-n-Ping!, you are not exploiting the maximum potential of your blog. Grab your self a free Poll-n-Ping! account without further dalay.

Ping more search engines than with Ping-o-Matic

Now you can ping more blog search engines at once than it was possible with Ping-o-Matic. Poll-n-Ping! added 3 more services today, bringing the number of services that will be pinged to 18 whil Ping-o-Matic only supports 16 services.

Poll-n-Ping! is the latest pinging service. Poll-n-Ping! is morethan just a pinging service, it monitors (polls) your blog for changes. Also provides notification, should you blog go down for some reason. All this comes for free, the best price ever.

Go grab your Poll-n-Ping! account now, you can forget about pinging and concentrate on blogging. Poll-n-Ping will take care of pinging blog search services.

Poll-n-Ping!, automagically ping 15+ services

Poll-n-Ping! added 8 more services today to the list of services that will be automatically pinged, bringing the number to 15. Register for a Poll-n-Ping! account, and put your blog details today and never bother about manually pinging when there are new posts in your blog; Poll-n-Ping! will take care of it all.

The number of services that Poll-n-Ping! supports will increase further in the near future. Don’t forget to create a Poll-n-Ping! account.

Recipe for compressed script.aculo.us

I was searching for a compressed version of script.aculo.us javascript library in one file. The search turned out almost fruitless; I found outdated script.aculo.us versions compressed. It was obvious to me that I was on my own. I also wanted to post the method to do it instead of the result.

YUI compressor was the best tool I could use to compress any javascript. YUI combined with gzip compression for compatible browsers would produce the smallest on the wire javascript files (See http://www.julienlecomte.net/blog/2007/08/13/).

First attempt to put all the script.aculo.us files into one file failed with mismatched dependencies. I had to find out the correct order to concat the files. As I found out the order should be scriptaculous.js, builder.js, effects.js, controls.js, dragdrop.js, slider.js, sound.js (I have specifically left out unittest.js). If you want you can throw in Prototype into the mix at the begining as it is required by script.aculo.us (I did that).

Run the following command in a shell prompt from the script.aculo.us root. to concat prototype and script.aculo.us.

 $ cat lib/prototype.js src/scriptaculous.js src/builder.js src/effects.js src/controls.js src/dragdrop.js src/slider.js src/sound.js > scriptaculous.bundle.js

You need to download YUI compressor, run the following command.

 $ java -jar /path/to/yui/compressor/build/yuicompressor.jar scriptaculous.bundle.js -o scriptaculous.bundle.min.js

In my case I use YUI compressor version 2.3.5 and script.aculo.us 1.8.1, and the file sizes were 244KB scriptaculous.bundle.js and 146KB scriptaculous.bundle.min.js. That’s a 40% compression.

You need to configure your web server to serve javascript files gzipped for user agents that are accepting gzipped content. You have to do your own reasearch for that :). After gzip compression was turned on for javascript files the size of scriptaculous.bundle.min.js on the wire is 41K, that’s a 83% compression, wow that’s alot of saving on bandwidth and loading time.

You can download the compressed and bundled script.aculo.us scriptaculous.bundle.min.js. Hope someone will finds it useful.