Archive for the ‘Uncategorized’ Category

Winter Project

Posted by sp2hari

10 things i have got to say about my project, stay in IIIT, Hyderabad and other things happened during this vacation. :)

0. Madhapur is in Hyderabad. Hyderabad is in Madhuapur
1. GTK won’t work. WxWidgets uses GTK. So WxWidgets also won’t work
2. I will never ever wash my plates. I’ll rather go hungry.
3. Canteen is a place where you never get good food.
4. Anything other than dosa is bad. :(
5. Only soup in 4 season is nice.
6. A hotel can be in the form of a forest or a train.
7. Mocktail is not cocktail. It is just 7UP added with rose milk.
8. You can play games even with 4 empty orange bottles.
9. The ball didn’t fall. :( :( :(

Windows

Posted by sp2hari

Finally installed Windows in my laptop. :)
No more kela configuring wifi and other things. If things work automatically in windows, why bang my head so much to make them work in Linux.
Can use Office 2007. Don’t know why, but every time i use Office 2007, the urge to install windows increases. I don’t mind calling it the best software in Windows, which is done thinking only about the end users. :)
No more trouble in finding the proper device driver for my monitor.
Realized that software development can be done in Windows environment also. :) Will have to see what i can do useful in Windows. First have to read more about command prompt. Looks like it has more features than i expected.

And yeah, I haven’t removed Linux yet. I don’t think I’ll do that within one or two years :)

Bash spellchecker

Posted by sp2hari

Spell checking in bash is a cool feature which can be added by adding just one line in your bashrc file.

shopt -s cdspell

That’s all :)
Add that to your ~/.bashrc file.
If you want to enable this for all the users, then append this to your /etc/bash.bashrc (in Ubuntu) or /etc/bashrc (in Fedora). Of course, you need the root privilege to edit the files in /etc.

Now try these
cd /hoem
cd /hoe

Cool right ;)

Mystery…

Posted by sp2hari

Not going to chaaaat anything about ‘Life is a mystery. Blah blah blah.’ Have realised it’s more than a mystey. The more you try to understand it, the more weirder it gets. :)

Have been seeing Prison Break for the past two days. Managed to finish Season 1 and it’s amazing. The way Mike plans things and the way things which can be no way related to each other are amalgamated are unbelievable. Ok now I didn’t name this Mystery to talk about Life or Prison Break. I’ll also write a mystery story here :D.

Ok. Here it goes. Thank god I’m not the hero or the villain in this story. I’m just a normal observer in this story. But since this is my story, all things happen around me. First i am a normal carefree guy. I do have contacts with many people (no, I’m not in mafia :D) . I know all of them very well and get into the good books easily. But some serious things happen around me and i was least bothered about them. I just don’t care about anything and enjoy doing what i do.

Then i was being taught how to be responsible and all. I was taught to think, eat, talk, hear and everything. I realised that I can do things. Now i know things are happening around me. Two person i know don’t like each other. The inferior person tried to get the rights back and obviously the superior didn’t like that. This resulted the superior trying harm the inferior in every chance possible. But even now i care very little about the things happening around me not because i was not ignorant but nothing was related to me. These things happen to me long time back. I was not paying attention to anything and just doing my things.

Now suddenly there is a need for me to know everything. This thing is not the key to the entire puzzle. In fact, there is no mystery here. Just that i feel things might get better if i know what happened, what is happening and what might happen.
There is one dialogue which I loved in Prison Break. Mike uses this very often.
“Trust Me, the lesser you know, the better.”
Hmmmm, yeah it’s true.

I know this story is way different than Prison Break. But can’t copy the same story. Will try to write more on this if i find time. :D. Will have to find who the superior and inferior is, how and when does the superior harm the inferior,from whom and how i learn things, why there is a need for me to find what’s happening around me.

Hmmmm, do i have to find out all these? ;)

Moral of the Story
1. If you know that you know that you can do one thing very well and don’t know about other, never try to experiment. Things you can do very well will never let you down :D. (Yeah, I should stop writing here and go back to coding :P)
2. The lesser you know, the better. Trust that.
3. It takes some n seconds for everyone’s brain to fetch, decode, process and produce the output. For my brain, it is around 2-5 seconds.

Resolutions…

Posted by sp2hari

Happy new year :). New year is the time for resolutions. I’ve had lots of funny resolutions till now. Some are weird enough that i can’t even type them here. Anyway this time, i wanted my friends to suggest me a resolution.So had my Gmail status saying

“Someone suggest a nice resolution for me.plzz”.

And look at the response i got.

Manas: 1600 x 1400

Geetanjali: I will have eyes and ears for others at least occasionally ;)

Ashwin: kadlaya kora.. that shud be ur new yr resolution

Karthik Swaminathan: resolution : “never to take resolutions” :P

Bharath Subramanian: stay out of octa!!! :P

Yazhini: “i’ll try my best, consciously and with effort, to use correct English”

Ashwin Prakash: moodittu iru!

Arvind: your new year resolution is to do away with new year resolutions.

Anyway, my new year resolution was to get up early and try to have breakfast everyday (usually i get up for lunch). But i was online till 5 in the morning on Jan 1st and got up at 1. :P. No more resolutions. I should have listened to arvind or karthik.:P

Time Machine ….

Posted by sp2hari

This post is total crap . So please don’t read this . :P :P

Hmmmm , then why am i writing this ?

Time pass . :P

I have always wanted a time machine . How nice it will be if you can chumma go forward write any test or exam and then go back prepare well, and then do that properly . How nice it will be if you can if you can screw up anything to any extent and then finally with a click of a button , everything gets fixed and you are back to square zero with no harm done to anyone. Hmmmmm now i guess a time machine will be the only thing i might needing. Like once i have that, anything and everything can be done without any fear or worry . :-)

If you can’t get what I’m saying , think about this . you are travelling in a crowded bus and somehow you have lost all money you had. (Let’s make this some 20lakhs if you don’t mind losing 10 or 20 bucks .) How nice it’ll be if you get a time machine and you go back to any point and get anything you want.

Looks funny but i want it . RIght now .

Hmmm…

Posted by sp2hari

I’m alive…

Photolog 2…

Posted by sp2hari

No clue why I’m posting this picture. Was studying for my semester exams and browsing the files in my computer.

Me, Taggy and Shagan in NOSIP Server

 

Sweet Memories. :-)

Exams :’( :’( :’(

Posted by sp2hari

Test in dream

Semester exams starting tomorrow. Do i need to say more?

:’(
:’( :’(
:’( :’( :’(
:’( :’( :’( :’(
:’( :’( :’( :’( :’(
:’( :’( :’( :’( :’( :’(
:’( :’( :’( :’( :’( :’( :’(
:’( :’( :’( :’( :’( :’( :’( :’(
:’( :’( :’( :’( :’( :’( :’( :’( :’(

No, that’s not enough. I guess this code should do.


#include <stdio.h>
int main() {
    while ('/'/'/') printf (":'( :'( :'(\n");
}

SSH Client…

Posted by sp2hari

I guess every GNU/Linux user must have sshed from one comp to another sometime or the other. We have different servers for various purposes in our college and ssh is a common thing. Most of the time, we end up typing some thing like

ssh -XCYP hari@spider.nitt.edu

Though not many knows what these options stands for, life will become very simple if you try to understand the command and create a configuration file for ssh and use it when you ssh from one box to another.

The ssh client takes the parameters from three places in the following order.

  • Command line options
  • User-specific configuration file
  • System-wide configuration file

The command line options are the one you specify when connect to other system using the ssh command. For example ssh -X specifies that X11 forwarding should be enabled.

The User specific configuration file is ~/.ssh/config.

The System wide configuration file is /etc/ssh/ssh_config. Note that the configuration file for ssh server (sshd_server) is also found in this folder. The file ssh_config is the configuration file for the ssh client while sshd_config is the configuration file for the server.

Any configuration value is only changed the first time it is set. So if you run the ssh command with X option, X11 will be forwarded no matter what values ~/.ssh/config and /etc/ssh/ssh_config file has. The values are parsed in the order mentioned above.

The User config file gives users the choices to configure ssh client when you ssh often. A config file is explained with an example below.

Host codelabs
    hostname codelabs.nitt.edu
    user hari
    ForwardX11 yes
    port 22

In the above example, very few options were added to make the config file simple. I guess that will be enough for everyone.

The config file has Host blocks. The properties which come under a host are set when you connect to the given to any host. In this example i have used the host machine called codelabs.nitt.edu. You can also specify * to apply to any host or 10.1.39.* to apply to all machines which comes under 10.1.39. series. Remember that the configuration values are set only once. So if * appears in the beginning of your config file, then the configurations which come below that may not be used by the ssh client. For example consider the following configuration file.
Host *.edu
    ForwardX11 yes

Now in the above case when you connect to any server which ends with .edu (spider.nitt.edu, codelabs.nitt.edu …) then the X is forwarded. But if you want to diasable X11 forwarding for spider.nitt.edu, then the following won’ t work

Host *.edu
    ForwardX11 yes
Host spider
    hostname spider.nitt.edu
    ForwardX11 no

This is because in the first block, ForwardX11 is set to yes for all hosts ending with .edu and then it can’t be changed. The correct way to block X11 forwarding for spider is to have a config file as shown below.
Host spider
    hostname spider.nitt.edu
    ForwardX11 no
Host *.edu
    ForwardX11 yes

You can tweak almost everything you need from the public key file, port, number of passwords prompts, compression, ciphers, compression level, user, tunnel, tunnel device and lots more. :) Happy sshing :-)


FireStats icon Powered by FireStats