Commands to get started with Amazon EC2

Here are some simple commands to get you started with using Amazon EC2:

ec2dim
Displays your account’s AMIs that are on Amazon

ec2run ami-XXXXXXXX
This launches your Amazon EC2 instance. Use your own or one of Amazon’s AMI IDs

ec2din
Describes your running instances with AMI and instance IDs

ec2dvol
Lists your account’s volumes and their status

ec2attvol vol-XXXXXXXX -i i-XXXXXXXX -d xvdf
Attaches an Elastic Block Storage device to your running instance

ec2detvol i-XXXXXXXX
Detaches the storage volume from an instance (use -f to force)

ec2stop i-XXXXXXXX
Stops a running instance so that you can perform maintenance on it

ec2minatt i-XXXXXXXX
Modifies an instance attribute such as the instance type

ec2start i-XXXXXXXX
Resumes your stopped instance

ec2kill i-XXXXXXXX
Terminates your running instance

Mount a Webdav folder in Ubuntu Linux

Webdav is a very handy protocol for writing files back and forth across the internet.

I’ve never really had much call for it – but I’m all for it lately as I’m trying out Alfresco and would really love to see a better way to upload files than the basic web-bsaed uploader that is provided.

As Firefox doesn’t had webdav support, I’ve had a go at mounting webdav folders in Linux. The results have been good, with a couple of small caveats that are remedied fairly easily.

First of all, you need to install the davfs2 package. Once done, we can start connecting to a webdav folder on t’internet:

Open up the terminal and create the mount folder:

mkdir ~/webmount

Now run the mount.davfs command to connect as root

sudo mount.davfs http://yourwebsite.com/webdav ~/webmount -o rw,uid=john

Now, let me quickly explain the paramters.
yourwebsite.com/webdav is the server and path
~/webdav is your local directory where you want to webdav files to appear
-o rw,uid=john is the options to set the webdav as re-writable and allow me (john) to have user-level access to the files. Make sure that you put your own username here.

And that’s it.

When you copy files, you might get an error such as this:

cp myfile.pdf ~/webmount/

cp: cannot create regular file `~/myfile.pdf': Input/output error

This is caused by the server not supporting file locks. You will need to edit the /etc/davfs2/davfs2.conf file and add the following line:

use_locks       0

Remount your webdav directory, and you should be able to create files with no problems.

Prevent WordPress from Hanging when You Log on

I’ve set up a WordPress site for a client and have had no end of troubles trying to get the site to behave – however there seems to be a constant problem of WordPress hanging.

Looking further into it – I discovered that the feeds in the Dashboard were making the browser and site hang. There is likely to be an issue tied into the host / browser / Javascript.

Anyway, if you find that you are having the same problem, follow these directions:

  1. Restart your web browser (if it isn’t already closed)
  2. Beofre visiting your blog, open up the settings and disable javascript. (IE / Firefox / Opera Instructions)
  3. Open up your blog site and log on in the normal way.
  4. On the Dashboard panel, you’ll see that there are now a number of panels that state they require Javascript – great!
    broken_dashboard
  5. On each widget – click on the configure link. Delete the contents of the RSS feed URL and then click on Submit
  6. Once done, you can turn Javascript back on in the broswer settings. You’ll see the widgets appear with errors on them.
    widget_nojs
  7. Now just go to the top of the page and click on Screen Options. Disable the widgets that show an error message and all will be right with the world once again!

It’s a bit of a pain, and I haven’t managed to get to the bottom of the problem as I am never in charge of hosts where the problems lie.

However, this workaround will at least get you going with your blog without any more hassle!

Block Facebook Adverts in Firefox

Anyone using Facebook will know that it’s quite annoying losing a good chunk of screen real estate to the adverts on the right hand side.

Of course, many others think so and there is a nice extension that will block various adverts around the internet including Facebook’s own.

Now, I’m not going to get into the morality of blocking adverts on websites here – I’m simply showing you how to do it. If the internet goes bust, it isn’t my fault.

  1. Open Firefox
  2. Click ‘Tools’ > Add-ons
  3. Click ‘Get Add-ons’
  4. Type adblock plus into the search box
  5. Click on the Adblock Plus extension and then click Add to Firefox…
    Firefox Add-ons Window
  6. Click Install Now
  7. Click Restart Firefox

Firefox should restart – so now we can use a subscription to block the adverts. If the Welcom to Adblock Plus window doesn’t open, click on Tools > Add-ons > Adblock Plus > Preferences. Click on Filters > Add filters subscription.

Welcome to Adblock Plus Window

  1. Select the Easylist USA option and click on subscribe.
  2. Click OK

That’s it! Now that you have the ad filtering installed – Facebook should now be advert free in the right-hand side of the page.

Hurrah!

BT Test User Account

Test your ADSL line using the BT test user account Broadband test

If you are unable to connect to ADSL using the login details provided by your ISP, then try the alternatives below to test your connection.

Here are the login settings to use for your router or modem to connect to the BT test domain.

User: bt_test@startup_domain

BT will ignore any password present in the password box, and therefore is not necessary to delete or modify these settings.

If you are unsuccessful connecting to BT test account and are sure your ADSL line has been activated and all hardware wiring is correct then contact your ISP to let them know.

If you connect successfully you can determine whether your computer software (e.g. Internet Explorer settings & firewall)and DNS are configured correctly by going to this URL: http://www.bt.net/digitaldemo/ If you can view this website then congratulations your software and hardware is configured correctly.

If the above is successful, then you have confirmed that your line is ADSL enabled and that the ADSL is working. The next test is to confirm that you can connect to your ISP. To do this, change the login settings again to use:

User: bt_test_user@your_connnection_pipe where your_connection_pipe is the bit after the @ symbol in your ADSL login.

This will test that you can login to your ISP using a default login. If this works, then it generally means one of two things: your ISP has not yet set up your account, or you have entered your details incorrectly.

Note that if you are successful with the above, you may now find that your login details work correctly even if they did not before. This can happen if the “session” you have with BT had failed to expire properly; reconnecting with a different login will usually clear this.
Test your ADSL line Speed Broadband speed test

This tutorial will explain how to use the BT ADSL speed test facility. This is a test often used by BT engineers when testing the speed on customer’s ADSL connections. It basically tests the time it takes your system to download a file from a BT server and thus determines the effective transfer speed of your connection. This test differs from the normal Internet speed test that PlusNet and websites like ADSLguide have, as the test only involves the BT network and not your ISP.

Here are the login settings to use for your router or modem to connect to the BT speed test domain.

User: speedtest@startup_domain

BT will ignore any password present in the password box, and therefore is not necessary to delete or modify these settings.

Once connected you will be able to access the bt speedtest URL http://speedtester.bt.com

On that page you will be promopted to enter your telephone number then click the “GO” button.

After a short time your results will be displayed against the different speed internet connections to give you a fair idea of your ADSL line speed compared to your service.

It is recommended that you repeat the test several times to give an average tested transfer speed. To repeat the test just click your browser’s back button, which will take you back to the first page. Then just click the GO button again to repeat the test. Don’t be surprised if the test results vary from test to test, this is not an accurate test but again will give you a fair idea of your ADSL line capacity.

Google Down! World Stops!

Well, it’s been going on for about an hour now. Google Mail appears to be having problems. The logon page is slow, logging in times out. Active sessions are broken.

I’ll mark this day in my calendar.

This has also affected Google Apps mail systems, including the educational packages that I’ve set some clients up with.

Will we ever recover? Will the world care? What impact will this have on the global economy?

Only time will tell.