06 October, 2007

An Achilles' heel in Google !!

So, the mighty google is not perfect afterall.... They found a way to hack gmail too !!
click here for all the details...

do check out if you have any unauthorised filters installed !!

UPDATE : (8th of oct)
Google says the vulnerabilities on blogger and google were fixed long before the public announcement by CERTIN on 27th of sept. Only the vulnerability on gmail was fixed on 27th sept !!!.... <:-P

28 September, 2007

Linux : converting wma to mp3

It was never this simple !!
The only thing you need is : MPlayer codecs (w32all-codecs). You probably already have them installed if videos (specially avi) are running fine on your distro

Change to the directory where the wma files are stored ....
Type in the following one-by-one in the terminal (a script file will also work .. and probably be much more simpler... but lets use the terminal !!)

Thanks to : http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/Convert_WMA_to_MP3)

//remove spaces
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done

//remove uppercase
for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done

//Rip with Mplayer / encode with LAME
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm -waveheader $i && lame -m s audiodump.wav -o $i; done

//convert file names
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done rm audiodump.wav



The only change you require is probably in the conversion script... wherein.. the -waveheader option is deprecated..
instead modify it as : -ao pcm:waveheader
and it'll work fine !!

simple and fast... eh !!

18 September, 2007

Etags

Imagine studying the linux kernel (for entirely sane purposes :D) with thousands of files containing thousands of functions... Around 70MB worth of text... And you are told to find a function in this haystack !! (well... don't even try grep.. it takes MONTHS to return a result.. I'd rather search manually :P)

Etags swoops in to ur rescue...
etags is basically a utility which generates tags for each function or data definition.
eg. a function declaration fun() would yeild "fun" as a tag. The corresponding file name and the offset at which the definition can be found is recorded in the file TAGS. TAGS is used by Emacs editor to simulate hyperlinks for tokens.
In simple language, if you come across a function and wonder how it is coded... just move the cursor over the function name and press M-. (M= meta key... usually ALT)... and voila!
The simplest way to browse a code !!
neat... eh!

wanna go back to where you were... no probs... M-* and there you are !!
Linux continues to amaze me!!

For kernel source code :
go to /usr/src/linux-[version]
login as su.. nd type in "make TAGS"...

For your own directory tree:
this is a bit clumsy since etags dosen't support nested directories... etags searches for specified files ONLY in the current directory... so.. the roundabout way is :
go to the root of your directory tree and type in
$ find . -name "*.[chCH]" -print | etags -
and voila!:D

what it does is... the find command returns all the filenames of .c and .h extension and this output is piped to etags command (the hyphen after etags directs etags to use standard output as its input)...

now that i see what linux editors can do... notepad suddenly appears soo lame !!:)

06 September, 2007

uhhh... suse problems !! (and solutions :d)

Yesterday was an eventful day for me. Finally I was prepared to completely dump windows and switch over to linux. As a part of that endeavour, downloaded w32 codecs and got video and all other workable things working on my Suse 9.3 ... and in the excitement of videos running flawlessly on my distro (which is outdated and antic :D), tried running as many as 5 movies on all possible video players !!

Today, I would quit Windows. Little did I know what Linux had in store for me :(
(Btw... this has forced me rethink the "completely" part of dumping windows... I'd rather use Windows to troubleshoot linux when it crashes :D... a worthy use for Windows :) )

The thing is, I have a 10G partition dedicated to Linux, of which only about 5G is currently in use. But, today while I was browsing the internet, a pop-up message showed up saying I was low on disk space and within minutes, all applications ceased and failed to load when I tried to restart them. I looked around for a while, then decided to reboot (the windows way :D)... but, when I rebooted, Suse tells me that I can't even log in because the disk is 100% full !!... Not a byte to spare for the user of the system to log in!!... (may be because XWindows system requires some disk space??) whats suse goin to do without ME :D

Anyways, so here's where windows comes in, a simple google search suggested that I use the du command to check the disk usage and then decide on the further action.
So, booted Linux in failsafe mode, and entered du :
The problem was : the temporary folder (/tmp) was hogging half of the disk with a whopping 4.8G !!

and why's that ??.... well .. apparently when I played the movies yesterday (which were stored on the windows drive), what linux did in the background was :
it copied the movie, realtime, onto the linux /tmp folder and then played the movie. i.e. the entire movie was being copied onto my linux drive in the background. And the responsible application didn't even delete it from the temp folder!! I am still not able to pinpoint whether the erring app is kaffeine, VLC or Mplayer... but once I do, its going to get a beating of a lifetime :D

So, solution ?? ....
$ rm -rv /tmp
(del contents on tmp folder)

22 August, 2007

Configuring suse : The n00b way !!

Gone are the days when Linux was ONLY for developers. Today, Linux is set to become the Universal OS. What with excellent multimedia and 3D games support. And .. anyone who has checked out the xgl graphics would certainly throw Windows out of the Window !!

Suse configuration is extremely easy, given you use the right source to get your info. The first thing you should know is how to use google. There is help on each and every topic you need, given you care to search for it !!

(Note: I use the Suse 9.3 distro... but the process described here is same even for later versions)
Configuring Suse for Internet : (DSL modems)
1. Don't be dumb enough to wrongly connect the hardware :D
2. Goto Start->System->YaST ... Enter the root password
3. Network Devices -> DSL (Ensure that your Network card is detected)
4. Click on "Configure" to Configure your DSL device
5. PPP mode = PPP over Ethernet... Click Next
6. If you don't have a provider added (which you probably won't) .. click "New"and fill-in the username.. password for the connection... Click Next.. and Finish !!
(You can click NO for the Configure Mail popup)
Done !!!!!

To Connect : Start -> Internet -> Dial Up -> Kinternet
Kinternet will appear in the Tray.... just click Dial-in.. and You are connected !!!<:-P


Getting the Multimedia Working :
Assuming the sound drivers and installed and working.. here's how you can get multimedia working...
Note that due to licensing conflicts, no codecs are available even for mp3 files....

1. Connect to the internet
2. YaST -> Software -> Online Update
3. Select Multimedia Option Pack 1 (compulsary for audio), 2 (for basic video.. like mpg..), 3 and 4 (extras)
(If you want only audio to be installed.. select only pack 1.. etc etc)
4. Complete the installation
And AUDIO is working !! .. but whoa.. the video still refuses to play....

To fix that... Uninstall Xine, Kaffeine, and LibXine1 (if you have them)

Now, you need to download latest codecs for avi, divx, etc to work..
The simplest way to is to use repositories... Reposiories are nothing but an online collection of packages.. I think, Packman is a really good and exhaustive repository... everything you need.. you'll find it there !!

here's how you add a repository : (make sure you are connected to the internet)
YaST -> Software -> Change Source of Installation -> Add-> HTTP
For Suse 9.3 ... add the following :
Server : packman.iu-bremen.de
Directory : suse/9.3
(for 10.0 and above... a simple Google search will give you the repository details)

once that is done .... Now you need to install Codecs and the players
So, go to
YaST -> Software -> Install and Remove Software
ADD : Win32all codecs, Xine, Kaffeine, LibXine1 and MPlayer (xine, kaffeine and MPlayer are media players) .. Install them..

and now... the Videos work too !!
(You need to uninstall and then reinstall the packages because the video players use the codecs available during their installation.. they can't be added later on.... )

Recommendations :
Audio player : AamroK simply ROCKS !!!
Video : Consider downloading either VLC player or MPLayer.. the default in Linux are clumsy to use

And then dump windows :D:d:D
good luck hacking with Linux.... Always say to yourself :
"I'll google before asking a dumb question" :D:D... and all your linux problems will be solved in no time !!

07 August, 2007

Top 10 !!

I thought I'd compile the list of top 10 songs I love... this list may, and will change almost every month... so keep checking

1. Ana : We Are (Spiderman 2- OST)
2. Boyzone - Words
3. Fuzon - Khamaj
4. Linkin Park - Leave Out All the Rest
5. Godsmack - Serenity
6. Metallica - nothin else matters
7. Led Zeppelin - Stairway to heaven
8. Eric Clapton - Layla
9. Guns n Roses - Sweet Child of Mine
10. KK - Yaroon Dosti

01 August, 2007

Music...........

Finally I mustered the courage to broach up the sensitive topic :D:D
why sensitive?... here's why --
(People claim) I am a really pathetic singer.... (not that I disagree... but to maintain a decent image of myself... I think of myself as the greatest vocalist of all times !!:D:D)... forget even trying to learn to play a musical instrument (I stay away from it for "The Greater Good" :D)... yet, I love music soooo much. I could listen to music for straight 5-6 hours. infact, 2 days after I installed winamp, the history showed that I played a total of 101 songs for 13:24 hours !!... I even intend to exploit the multitasking abilities of windows (and lately Linux) to the extreme... what with winamp, mozilla, yahoo, Word, etc etc always open at the same time! its impossible to even think of doing something without music in the background... my computer is either turned off or Winamp is running... such is the craze!...

and I listen to.......
Linkin Park (all time fav...), Nirvana, Coldplay, Scorpions, Beatles, Metallica.. and some of the songs of Pearl Jam, Led Zeppelin, GodSmack, 3 Doors down, Guns n Roses, Johnny Cash, Pink Floyd, Rasmus, U2, etc etc

among others would be - 1990s ke hindi songs, fuzon and aayushyavar bolu kahi, diwas ase ki and namanjur....

and the list is by no means exhaustive ... there are many many others... but I have better work to do than document all of em (like trying to share directories on linux... even though ping works just fine, sharing which would take max 15secs on windows, is a herculean task on linux :D)

so music is my soul, but you don't want to ask me to perform :D:D... its all jolly-good ONLY until I am LISTENING and NOT participating :P...
(btw.. I accept suparis for murders and torture :d)