Wednesday, September 17, 2008

The state of the internet reports from akamai

Akamai is publishing quarterly report on the internet called "The state of the internet"
These reports can be found here http://www.akamai.com/stateoftheinternet/
It can be downloaded after quick registration.

The reports give interesting insights into how internet works.

interesting things I found, relating to india:

1) Reliance Globalcom is a big player in cable connectivity
sinip--
"In April 2008, Reliance Globalcom used satellite imagery to identify two ships that were in
the area of the original cable cuts, and that had improperly dropped anchor in the area.18
The owners of one of the ships paid $60,000 in damages to compensate for repairs, while
the second ship was impounded in Dubai."

2) Some good things happening for india
snip--
"A consortium of 16 telecommunications firms has contracted to build a 15,000 km
submarine cable system linking India with Europe via the Middle East. The Europe India
Gateway (EIG) will cost $700 million and add 3.84 Tbps of capacity. The EIG consortium
includes firms from the US, Europe, Africa, the Middle East and India – including AT&T,
Verizon, BT, Cable & Wireless, MTN, Telecom Egypt, Omantel, Saudi Telecom Company,
du, Bharti Airtel, Gibraltar’s Gibtelecom, PT Comunicacoes of Portugal, Djibouti Telecom,
Maroc Telecom, Libya Telecom and Technology, and Telkom South Africa. Initial landings
are for the cable are planned for the UK, Portugal, Gibraltar, Morocco, Monaco, France,
Libya, Egypt, Saudi Arabia, Djibouti, Oman, the United Arab Emirates, and India.

At least two other new cables serving much the same route as the EIG are also currently

being planned. Tata Communications is leading the consortium behind the IMeWe
system, due to add another potential 3.84 Tbps to the route when it goes live in 2009.
Also backing IMeWe are Etisalat, France Telecom, Ogero of Lebanon, PTCL of Pakistan,
TIS Sparkle of Italy, as well as EIG investors Bharti Airtel, Telecom Egypt and STC. Tata is
also behind the TGN Eurasia Cable System, set to link Mumbai with Paris, London and
Madrid via Egypt, with Seacom and Telecom Egypt as fellow sponsors.36
Along these lines, research firm Telegeography’s annual Global Bandwidth Research
Service noted that 25 new submarine cables will be built over the next three years"

Tuesday, August 19, 2008

Download youtube videos using clive

How do you download youtube videos onto your computer? Do you use those web sites to do it?
There is a smarter way of doing it.
The clive command. It is available for Linux. Not sure about windows.
If you are on ubuntu life is easier... 'sudo apt-get install clive' will install clive.

downloading a video is as easy as typing the command,
$clive 'http://www.youtube.com/watch?v=sOpCfIRA9MY'

Do quote the url, it may have special characters that the shell interprets.

Read the man page for more details.
The feature that I liked is the ability to download multiple videos....

put all video links in a file, ex: videos.list then,
$cat videos.list | clive

Monday, July 28, 2008

flip characters upside down - unicode trick

You ca get your sentences flipped using this link
http://www.revfad.com/flip.html

This a simple Unicode trick. view the page source of the above link, you can find a table that maps the usual characters to their flipped versions.

Wednesday, July 9, 2008

Image magic with ImageMagick

There are various graphical tools available for manipulating images. but Imagine doing this using command line. sounds geeky !
This can be useful when you want to perform the same action on large number of images. think about reducing the size/quality of 100's of images captured on your digital camera so that you can upload them to the internet, or email them.

ImageMagick is a collection of tools that can help you do this.
You can download it from http://www.imagemagick.org/script/index.php . On ubuntu install it by typing "sudo apt-get install imagemagick"
"man imagemagick" for man page of imagemagick.
You can also look at the man page of individual tools for more detailed information

Useful Links:
--------------
Imagemagick page:
http://www.imagemagick.org/script/index.php

found this page particularly useful.
http://www.imagemagick.org/Usage/

quick start to reduce image sizes:
http://www.linuxforums.org/forum/suse-linux-help/39848-how-reduce-jpeg-file-size-email.html

Monday, June 2, 2008

Clip, cut, split mp3 files using dd

I accidentally discovered a wonderful use of the dd command on ubuntu.

clip mp3 files.

It looks like mp3 format does not have any header or footer. So copying some contiguous bytes from somewhere in the file seems to create another valid mp3 file. WOW!

I have a large mp3 ("041-oru maalai.mp3") file(song) but I feel a part of it sounds good as a ring tone for my mobile phone. I want to skip the initial music and start from the lyrics. And also cut the song and make it smaller.

The below command does it.
dd if="041-oru maalai.mp3" of="041-oru maalai_small.mp3" count=6000 skip=900

count says how many blocks to copy.
skip says how many blocks to skip form the beginning of the file.
see man page for block sizes.

now "041-oru maalai_small.mp3" is what I need.

Given this, you can do a lot of stuff.
Possibilities are limited only by your imagination.
for example, you can clip a few file and cat them to form a single music file... WOW!

Friday, May 30, 2008

Backup your installation using simple tools (dd, partimage)

recently I came to know about very simple but useful tool 'dd' which can be used to a lot of amazing stuff. Here is an anazing tutorial

there is a project called partimage, that is specifically meant for backing up and restoring your partitions.
partimage home - http://www.partimage.org/Main_Page
backup drive using ubuntu live cd - http://www.psychocats.net/ubuntu/partimage

Now, I have backed my ubuntu and windows installations...

Monday, May 26, 2008

unit test code coverage using gcov

You can get a detailed and useful report on code coverage of your unit tests using the tool gcov.
It is very simple to setup and use.

useful links:
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/gcc/gcov.html
http://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Gcov.html

Friday, May 23, 2008

list files in .rpm package file

You may want to list the files that will be installed by an rpm package
rpm -qlp will do it.

Monday, May 5, 2008

partition using gparted on ubuntu live cd

When you buy a laptop, you mostly get it with windows installed. (Monopoly you see...;) ) . So if you want to install Linux without loosing the existing windows, then you have to resize the existing partition. Well, you can do this using partition Magic. But when I tried, I kept getting one error consistently, it looked something like this: " error 1161 bad system file name" .

what next?

Ubuntu Live CD has a tool called gparted which can be used to do this.
If the disk does not have bad sectors, you can simply resize by dragging the slider in gparted.
I had to use ntfsresize first to resize the ntfs filesystem before using gparted to resize the partition.
So boot the live CD. run ntfsresize to resize your filesystem, use gparted to resize your partition.
you can as well create other partitions to install linux here itself.

The resizing is a bit tricky. You need to first resize filesystem using "ntfsresize" and then the partition with gparted. So search the web and find the right instructions to do this

useful link...
http://www.nishants.net/articles/ntfsresize.htm

New ubuntu installation with all softwares from a previous installation

I am using ubuntu Gutsy on my (office)desktop. Recently got a Lenovo T61 at office. Now I want all packages that I installed on my desktop ( which I installed as and when I needed ) to be installed on laptop also. So here is how I did it (by googling of course).

Get the list of all packages installed on your machine using this command:
$ dpkg --get-selections > sw.list

on new machine:
copy sw.list first. Then use following commands to install all these packages.

$ cat sw.list | sudo dpkg --set-selections
$ dselect

Links on internet:
http://ubuntuforums.org/showthread.php?t=261366
http://www.cyberciti.biz/tips/linux-get-list-installed-software-reinstallation-restore.html