Monday, September 14, 2009

One line command to update Ubuntu

I use this command to update my Ubuntu installation.
$ sudo apt-get update && sudo apt-get upgrade &&
sudo apt-get autoremove && sudo apt-get dist-upgrade

Transformers vs the police

Transformers vs the police

Saturday, September 5, 2009

Disable Vista Welcome Center and Sidebar

Disable Windows Vista Welcome Center

  1. Click Start, Control Panel.
  2. Select Welcome Center.
  3. Uncheck the "Run at startup"option, located at the bottom of the Welcome Center screen (Figure 1).
Figure 1: Disable Windows Vista Welcome Center

Disable Windows Vista Sidebar

  1. Right click on the Windows Sidebar icon in the system tray.
  2. Choose Properties.
  3. Uncheck the "Start Sidebar When Windows Starts" checkbox (Figure 2).
  4. Click OK.
Figure 2: Disable Windows Vista Sidebar

Monday, August 24, 2009

How to determine the linux distribution name or version

There are multiple ways to check what linux distribution and version you are using.

Here are some of them.
$ cat /etc/issue
Ubuntu 9.04 n l
$ uname -a
Linux riza-laptop 2.6.28-15-generic #49-Ubuntu SMP Tue
Aug 18 19:25:34 UTC 2009 x86_64 GNU/Linux
$ lsb_release -d
Description: Ubuntu 9.04

Saturday, August 22, 2009

Cursor jump to other location while typing on Ubuntu

Disable mouse clicks with touchpad
I am using Ubuntu 9.04 for my Dell Vostro 1400 laptop, and faced a very annoying problem where the cursor jump to other location - probably to the location of mouse arrow - while I am typing.

How do I solve this problem?

What I do is, I disable the "Enable mouse click with touchpad" in the "Mouse Preferences" dialog box.

To bring up the "Mouse Preferences" dialog, click on System > Preferences > Mouse.

Wednesday, August 19, 2009

Python: How to convert a dictionary into a list of key-value

Using the list() function, we can convert a dictionary into a list of key-value tuple.
>>> x = {'a':1, 'b':2}
>>> x
{'a': 1, 'b': 2}
>>> y = list(x.items())
>>> y
[('a', 1), ('b', 2)
To convert back into dictionary, use the dict() function.
>>> z = dict(y)
>>> z
{'a': 1, 'b': 2}