I happened to see a one-liner shell script to setup a websever pointing to the current directory while surfing. Just think of it. How much powerful is the GNU/Linux bash environment ??

Awesome !

while [ $? -eq 0 ];do nc -vlp 8080 -c'(r=read;e=echo;
$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;
f=`$e $b|sed 's/[^a-z0-9_.-]//gi'`;h="HTTP/1.0";
o="$h 200 OKrn";c="Content";
if [ -z $f ];then($e $o;ls|(while $r n;
do if [ -f "$n" ];
then $e "<a href="/$n">`ls -gh $n`</a><br />";
fi;done););elif [ -f $f ];
then $e "$o$c-Type: `file <del>ib $f`n$c</del>Length: `stat -c%s $f`";
$e;cat $f;else $e -e "$h 404 Not Foundnn404n";fi)';done

Being a free software enthusiast, it was shame for myself keeping music files in a proprietary format like mp3. During some chat conversation with Shyam I recalled the thought. I never went for a second thought. Wrote a bash script and converted all my music files to ogg vorbis format :) . Now I’m free.

Free as in Freedom

Ogg Vorbis is a free and open source replacement for mp3 music format. More than the freedom thought, I have found some more benefit. After conversion from mp3 to ogg, I freed some more disk space. ( 1.5 Gigs to 1.2 Gigs ) :)

find base_dir_path -type f -name "*.mp3" > list ;
while read each_file;
     dir2ogg "$each_file";
     rm "$each_file" ;
 done < list ;

Last day, I was in panic and was trying to figure out some way to transfer three Video DVD images (of 4 GB each ) to my desktop from laptop. It would take a lot of time if I am sending these files through LAN or transferring through other media. My parents were restless in watching the Marriage party video from those DVDs. Since I was busy with some other business I wasn’t able to give away my laptops to my parents for watching the video.

Finally VLC, VideoLAN project came to my help. I decided to broadcast video through WLAN network at home :) It was awesome. I could do all my works sitting at some corner at my home and they could watch the video without my disturbance.

The broadcast server


The streaming desktop

VLC rocks !

I am tuned in love with vlc :)

Today digg has about “Why do I love Linux” :) I found it interesting and added the pic here.

freedom

The prime reason why use GNU/Linux.

It has been a long time, since the mid of the last year I were writing lots of code fragments in C programming language.

Ever since I started using Input console functions like scanf(), getchar() etc. I faced a common problem most of the times. But I ignored it by several adjustments. Last day I had a good mood for investigating and fixing this problem. Let me describe you the head scratching code.

main()
{
        char a[10],b,c[10];

        printf("Enter string1:");
        scanf("%s",a);

        printf("Enter char");
        b=getchar();

        printf("Enter String2:");
        scanf("%s",c);

        printf("n Read strings: %s  %c  %s",a,b,c);
}

Output : [slynux@localhost logs]$ ./a.out Enter string1:string Enter charEnter String2:who Read strings: string
T The expected output is:
[slynux@localhost logs]$ ./a.out
Enter string1:string
Enter char:c
Enter String2:who

 Read strings: string c who

But it doesn’t happen.
I was having some conversation with vu2swx (Sunil Sir). [ He is one of my Gurus to GNU/Linux]. He told me that this problem happens because, getchar() takes one character from standard input buffer (stdin). From googling a bit I learned that lots of people face the same problem and I couldn’t find some clearcut solution to the problem.

In order to prevent getchar to read a character from input buffer, adding an extra getchar before original getchar will help. The extra getchar reads off the unrequired character and hence expected output is produced. Sometimes clearing buffer may also help. fflush(stdin) can be used.

Modify the code as below:
main()
{
        char a[10],b,c[10];

        printf("Enter string1:");
        scanf("%s",a);
        getchar(); // to absorb the char from stdin buffer.

        printf("Enter char:");
        b=getchar();

        printf("Enter String2:");
        scanf("%s",c);

        printf("n Read strings: %s  %c  %s",a,b,c);
}

During Computer LABs, I used to find lots of guyz struggling with this getchar() related this type of problem. I think this blog post may help my peers.

gsoc

Finally, Google Summer of Code application selection list has published.
Gladly, I’m one among the list. This is the fourth edition of google summer of code program which is held annually by google for promoting Open Source Software development. Lots students across the world contribute by writing code during gsoc period. Lots of open source organisations(google shortlisted organisations) project ideas. Students can either choose some idea or they can propose idea of their own and submit project proposals. The organisations will review the applications and they will select eligible students. They will be given 3 months time period for planning and coding.

For more info on gsoc program see FAQ.

I am selected for non-linear editor / Screen cast helper project under Fedora as mentor organisation.
Basically I will be working for updation and addition of some features to an existing Open Source video editor PiTiVi including direct screen cast from GNU/Linux desktop. I came up with the idea of a basic video editor based on ffmpeg platform. ie, I was planning to writing a GUI for ffmpeg which is rich library having only a commandline interface. In GNU/Linux platform, we really miss a simple video editor for carrying out simple tasks such as cutting movie clips, mixing, converting between formats etc. I found similar idea on Fedora community gsoc 2008 project list put forwarded by Kushal Das. Developing an ogg video editor. I was impressed and applied for it. Finally, John Palmieri came up offering me mentoring if I could do updation and making PiTiVi much usable by adding some features. I was impressed by looking at PiTiVi and applied for the project.

Today the news is up. ” Congratulations !, I am selected for gsoc 2008 :D

http://code.google.com/soc/2008/fedora/about.html

gsoc2008
I would like to thank Santhosh Thottingal, for urging me to apply for gsoc 2008.

The challenge:
I have to work on PyGTK with a combination of gstreamer python bindings and gnonlin. Even though these libs would be much more interesting to work. I dont think it isn’t easier. I haven’t probed my hands much into these libs for hacks till now. Its going to be the first attempt anyway. Anyway the target is a challenge limited in 3 months time. Its a fun in doing everything with FOSS !

Latest: University exams are scheduled for June :D . Since I’m gonna play with gsoc project, GOD truly knows what I’m going to write for exams.

Cheers!
Have fun.

Happy Vishu wishes to all.

vishu

*vishu : Among the various Hindu festivals in Kerala, Vishu is unique. This is a symbol of the unostentatious Malayali and so Vishu is free from the usual pomp and show and merry-making associated with other festivities. Secondly, this one has nothing to do with religion. Also the first day for Medam is the unchangeable day of Vishu, whereas other festivals are determined according to the lunar asterisms on which they fall.

slynux@slynux-laptop:~$ history|awk ‘{list[$2]++ } END{for(i in list){print list[i] ” ” i}}’|sort -rn|head
79 sudo
38 gcc
34 ./a.out
32 cd
27 ls
25 vim
25 apt-cache
22 man
18 cat
16 ssh

I came across Nokia’s concept video on nano technology based hand held devices. Something called Nokia Morph.

Look at this. How amazing it is !

Its truely amazing what we can do with nano technology.

Next Page »