How to set static IP on Ubuntu

Did you ever have a need to set a static IP address on a Ubuntu box? Well, here's how to do it:
1) edit file /etc/network/interfaces
2) change your file to look something like this:

auto eth0
iface eth0 inet static
        addresss 192.168.1.8
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

If you want to go back to DHCP, simply change it back to:

How to rename multiple files using bash

So, I've had an issue recently, where I had a whole bunch of folders with some common part that I needed to remove. After searching on the internet I came across a website with the following script:

[bash]
#!/bin/bash
for item in *; do
newItem=`echo $item | sed 's/find/replace/g'`
mv "$item" "$newItem"
done
[/bash]

So, in my case, when I tried to remove a string 'str', I did the following:
[bash]
#!/bin/bash
for i in *; do
j=`echo $i | sed 's/str//g'`
mv "$i" "$j"
done
[/bash]

How to parse sections of ncover report using regular expressions

So, today I was faced with an problem at work where i had to find out how many lines of executable code does each project have in our solution.
Opening a code file and counting each line individually is not a great approach, especially if you have 100+ projects.
So, I thought of using regular expressions to get different parts of the ncover report.
At first I was getting a list of all projects by using the following regular expression:

Windows Tips and Tricks

Are you using the the New menu to create new folders, shortcuts, documents? Are you waiting for a long time for that menu to come up? Are there any items that you are not using? Are you using 'SendTo' menu element?
If you have answered 'yes' to any of these questions, keep on reading...

How to remove unused elements from the 'SendTo' of a context menu

1) Open up the SendTo folder by either navigating to C:\Documents and Settings\<user name>\SendTo or typing sendto under Start | Run
2) Removing anything that you are not using

How to get out of the looping screen alignment.

If you are running a custom ROM on your Windows Mobile device and can't align your screen, then read on...

I have recently flashed my Samsung Omnia (i910) to yet another Windows Mobile 6.5 release (build 23091). The problem that I was facing was not being able to align my screen. After I hit all 5 points, it just restarts. So, I have been doing some searching since I really needed screen alignment and here's what I've found: