It's Not About the Bike: My Journey Back to Life

I am not a huge fan of [auto]biographies. I consider it boring to read about the lives of celebrities. Prior to this book, I have read just two autobiographies, of Mahatma Gandhi and Linus Torvalds (Really, Should I link to their wikipedia page ?) The former surprised me about Gandhi's transparency and the latter made me feel that an assorted collection of Linus' LKML review comments will make a better read.

I picked up It's Not About the Bike: My Journey Back to Life an autobiography of Lance Armstrong from my Library, as I have heard a lot about this book from my reading circle. It is an old book written about a decade ago and it is a shame that I came across this only so late. It is about Armstrong's fight against cancer and how he survived to win Tour-de-france after his monumental fight with cancer.




My Verdict: 5 Stars. Buy this book immediately.

... However, Don't read the book immediately. Keep this book in your closet. If at some stage in your life, if you feel very down morally (dumbass supervisors, evil managers, bad job, layoffs etc.) read this book and you will have a new ray of hope. It will help you realize some of the common wisdoms. Few things I re-realized after reading this book are:
  • Never give up your self-confidence. If you don't believe in yourself, none will
  • Family and friends are more important than day-job / bread-fetching
  • Even Lance Armstrong had his self-doubts. Nobody can be Chuck Norris. Don't be scared by self-doubts
  • Humility is the mark of a true hero
  • Bruteforce is not a solution to all problems
There is one section of a book which I found a little boring, when he takes us through the race in the tour-de-france. May be people who are interested in racing may find it interesting. I learned that bike racing is majorly a team event only after reading this book. I thought it is an individual sport.

This book is not meant for casual glancing at coffee time but for a deeper reading experience. You won't feel sad after reading the book though, but instead will feel a lot inspired. Highly recommended.

P.S: While reading this book, I came to know that one of the well-known Tamil actresses, who have stolen the sleeps of quite a few people, is actually a cancer-survivor and had a newly found respect for Mamta Mohandas.

Current Music: Atrai Thingal Vaanidam ...

Porting Sonar Theme to GTK3

Dear Internet, the openSUSE GNOME team needs your help in porting the Sonar theme to GTK3. We require people with skills in CSS for this work. For more details please refer to this mail by Vincent Untz. If you want more details, please join #openSUSE-GNOME in Freenode IRC.

Thanks.

Show/Hide Files and Icons in GNOME Desktop

I wrote about webilder earlier which will give you stunning random wallpapers for your linux desktop from flickr. I have a habit of allowing the number of files, screenshots and documents in my desktop to go on a large number. Once they reach a critical number, I get around to cleaning the files. But because I have so many files, the beautiful wallpapers are sometimes not shown clearly. I felt there should be a way to toggle showing the files in Desktop and it turned out there is a way.

Step 1: Launch gnome-keybinding-properties

Step 2: Click on the "Add" button in the bottom and in the resulting dialog, type "Hide Desktop Icons " for the Name field and for the command field, type:

gconftool-2 -s --type boolean /apps/nautilus/preferences/show_desktop false

Step 3: Create another keybinding by clicking the "Add" button and this time create a "Show Desktop Icons" item. The command for this will be:

gconftool-2 -s --type boolean /apps/nautilus/preferences/show_desktop true

Step 4: Set custom keyboard shortcuts for these two commands. I have used Alt+F11 and Alt+F12 in my case.


Update: You can just use the following command and have only one keyboard shortcut as well. Thanks to the anonymous commenter who provided the tip (please guys, leave your name when commenting :))
gconftool-2 --toggle /apps/nautilus/preferences/show_desktop


Now you can toggle (show/hide) your desktop icons at a keystroke and enjoy your clean wallpapers.



HTH :-)


Download all youtube videos of an user

Recently I got addicted to watching Nigella Lawson Cooking videos on youtube. As much as I like youtube, I prefer to watch videos offline as well. One user has uploaded a lot of those videos and I wanted to download all the videos by that user.
I tried a few firefox plugins, youtube-dl python script, etc. for doing this but none seemed to be fit for the job. Good old Shell-script came for rescue. I saved the user's youtube homepage in .html, grepped through the file for links, ran uniq and then fed them all to youtube-dl and bulk-downloaded all the videos. If you want parallel downloads, you can easily do that also by tweaking the script.

The commands are:

> grep -E 'http://www.youtube.com/watch\?v=[[:alnum:]-]{11}' dump.html -o | sort -u > vdos
> for i in `cat vdos`; do youtube-dl -t $i; done; rm vdos;

HTH someone.

If you know of a better solution (some firefox/chrome addon, Greasmonkey, etc.) which will work in Linux, please let me know.

Update:
1) MessenJER told in my comments that I could achieve the same by going to the RSS page of the user:
http://gdata.youtube.com/feeds/base/users/SomeUser/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile


2) Vignesh V corrected a mistake in my previous command. From the man page of uniq:
'uniq' does not detect repeated lines unless they are adjacent.  You may want to sort the input first, or use `sort -u' without uniq

Introducing Sqlite-Commander - Curses Client for your SQLite Database

I am happy to introduce to you, my recent nighttime hack "Sqlite-Commander - A Curses client for your SQLite Database".

While I was working in a project involving sqlite, I wanted to check the contents of a sqlite database. The command line sqlite client involves too much of typing for viewing records. The sqlite viewers that I found were not very keyboard friendly. There was a firefox extension which looked good but I felt it is too clumsy to launch that application. Also, I wanted a tool that will read SQLite tables over ssh without requiring much bandwidth. I could not find any CUI client for SQLite and I felt it may be useful to write one, atleast for my satisfying my needs. So, here we have Sqlite-Commander. The name is inspired from an awesome piece of software Midnight-Commander written by Miguel De Icaza.


Screenshot
Sqlite-Commander => Click to enlarge


Features
+ Shows the list of tables in the left pane.
+ Allows you to navigate the list of tables using arrow keys.
+ Shows the first 30 records for the selected table in the right pane
+ Non-printable columns are shown with a ???
+ Maximum of 30 characters are displayed per column. Column data exceeding this length are shown with "..."


TODO
+ It is not a full-fledged SQLite client with rich features. It is like an enriched version of cat for working with sqlite. I don't intend to make a release, as  I am not sure if this will be useful for anyone other than people who work with SQLite and can use only a terminal/ssh. If there are enough users, I will enhance and make it a full-fledged product. So drop me a mail if you are interested in this project.
+ It should be fairly straight-forward to implement connectivity to any database (MySQL, Oracle, etc.) such that we can have a generic SQL NCurses client. It will be a good exercise for someone who wants to know C#.
+ Add a scroll bar and show more than 30 columns. Should be moderate/easy to implement.
+ Add a dialog box to execute any random SQL statement. Should be fairly trivial to implement.
+ Create Events such that pressing Enter on the records list will pass the currently selected record to a custom script/command. Useful ?
+ Copy selections of records to clipboard.  Easy to implement.
+ Handle tablenames with special characters.


Thanks
Credits are due for the awesome mono-ncurses interface authors (Miguel and Co.) If you are looking to writing some terminal application I can heartily recommend that mono-ncurses is the best library you will ever get. Before beginning this application, I evaluated a few options (like Python etc.) and nothing comes close to being as easy to use as mono-ncurses.  Also, special thanks to VIM and git, two of the most productive tools ever invented.