Saturday, October 4, 2008

Bang Bang Bang

Until today, I was wondering what the first line in the shell programs was called.


#!/bin/bash
It is called the She-Bang Line. wiki says, it's also called as hashbang, hashpling, or pound bang.
WTH :D


Wednesday, May 21, 2008

Perl tutorial

I wanted to read PERL for a long time and finally was forced to read it :P
This amazing tutorial helped me out for a start.

Thanks to keyur :P if you are reading :P

Installing sopcast on Linux (Ubuntu 7.10)

Sopcast was a better alternative to a lot of people who looked for streaming content online. It was meant for Windows users all this while, though the linux users too wanted something similar there were no proper tutorials which explained the setup on linux. After a lot of googling, I found this one article which explained clearly step by step. I didn't want the article to be lost, so hence i am digitizing a copy of that in my own blog.

All credits to this guy who wrote this in the first place. The original found in his site


Installing SOPCAST in Linux Ubuntu 7.10

Note this will vary on different versions, but this guide is intended for Ubuntu 7.10 Gutsy.

Adding Repositories


Run these commands in the terminal:

gksu gedit /etc/apt/sources.list

Add this line: "deb http://packages.medibuntu.org/ gutsy free non-free"

sudo apt-get update

sudo apt-get install qt3-apps-dev vlc build-essential

Downloading the latest Sop Cast binary

http://download.sopcast.cn/download/sp-auth.tgz

Unzip it and cd into that directory using terminal. Then run:

sudo cp sp-sc-auth /usr/bin/sp-sc

Downloading and building the latest GUI


Download the most recent source package from this page:
http://code.google.com/p/qsopcast/downloads/list

Aga‌in, unzip it and cd into that (src) directory using terminal. Then run

sudo qmake
sudo make
sudo make install

This should compile the source and install the binary into the correct location.

Creating an menu shortcut

Go to System / Preferences / Main Menu... then 'Internet' and 'Add New Item'. Give it the name "QSopCast" and command "qsopcast". You should now be able to launch from the main menu.

This didn't work for some reason in my machine, so I open "qsopcast" direct from the extracted folder. Next is to update the played to vlc and channel URL :P(given below)

Setting up the GUI

Once the gui is open, goto config then config again. Make sure that the player settings are all set to "vlc" and that the channel URL is set to "http://www.sopcast.com/gchlxml"

You should now be able to watch sop casts by selecting a channel, launching it and then hitting player when the stream is at 100%

Thanks. Sopcast rocks. :D

Wednesday, April 30, 2008

Apache2 Installation problems on ubuntu 7.10

Apache2 was already installed on my machine but I just couldn't figure out how to get it working. Everything seemed fine, just that the server wouldn't start on the localhost.

I googled for a long time and then finally hit upon this lovely thread.

The solution was pretty simple, I just had to bring up my localhost.

Problem : lo was down

* feeling embarrassed *

Solution

sudo lo up

Saturday, April 12, 2008

Mysql-Server-5.0 Installation errors on Ubuntu errors

When one tries to install mysql on Ubuntu OS, the following error might occur.

user@usersLappy:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
2 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up mysql-server-5.0 (5.0.45-1ubuntu3.3) ...
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.0 (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.0; however:
Package mysql-server-5.0 is not configured yet.
dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

A simple remedy is to edit the following file.

/etc/mysql/my.cnf

Comment the part where it binds to the local directory.

# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1

save the file and try to install it again :)

It would work.

Sunday, March 16, 2008

Tips to become a good programmer

I've always felt that a guy needs 2 things to become a good programmer.

1. Knack
2. Practice

Nothing can substitute the 2nd one. First up, one has to find the enthu to sit down and code. One has to understand and appreciate other's code and coding techniques. But before that, he has to understand how to talk to the computer using the language. Once he realizes how to do that, the knack of coding is achieved.

Now the 2nd one is harder. To become a good programmer I am told that one has to sit and code each and every single day for atleast 2 years. I would say, atleast 1 month to learn the KNACK of programming and atleast 1 year to realize that you can become a better programmer by practice.

Now you are on your own!
Good luck :)

Saturday, March 8, 2008

Tim Toady

My spring break just started and I wanted to use this time to improve myself technically. I started reading a few things with a view of creating things rather than just learning and running in the never ending rat race.

I began reading perl and this is the first thing I noted about its design.

There is more than one way to do it.(TIMTOWTDI... usually called Tim Toady)

Tim Toady...:P

Sunday, February 17, 2008

Head First Java

I never had the enthu to master any language. Thou I was like the jack of all trades and sinbad of all seas, I never mastered any damn language but I knew most of them. I knew to survive. But, doing my masters I wanted to master atleast one language. A friend of mine suggested "Head First Java" by Kathy Sierra and Bert Bates before I came to the US. I never touched the book since I bought it.

My first big assignment was to create a Secure chat system in unix. I started working in C since I always felt, sockets in C were cool. But looking at the complexity of implementing DES in CBC mode, SHA-1, modified kerberos and what not in security concepts :P, we(me and Vishy) decided to work in java. But then I was blank in java, so caught hold of the book I mentioned in the above para. It changed my coding life and my view about java, thats all i would say.

Even now I cherish reading that lovely book. Go get a copy of that.

Tuesday, February 12, 2008

Hello World!

Hello World!

The first sample program one will get to learn on any book or online resource is the Hello World program. Being a techie all through out my life (till date I should add) let me begin my first post with those 2 lovely words. :P

Okay, this blog is gonna host loads of techie news, codes, reviews, views and some other junk that one wouldn't bother to read. But then I am just creating this to digitize the stuff that I get to know.

As I type this post
at 2:40 AM, I see lightning and hear thunders. Before I could realize the current went off. Some would call it "A dark beginning". Being an optimist I am gonna say, someone turned off the lights to turn the spot lights on.

Oops! The wifi thingi doesn't work as well. Grrr. Alright I'll wait till morning.

9 AM,

Lights, Action, Camera...... here we go!

Agnel codes....



Tadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!