April 29th, 2010
1 Comment
The situation is I have an existing C# web application (.NET 3.5) hosted on Windows Server 2003 on a company Intranet. I want to get the name of the computer on which the web application is hosted. This can be achieved by:
Environment.MachineName
Environment requires the System namespace.
April 1st, 2010
No Comments
For the longest time, whenever I needed to restart X, I would simply reboot. It never occurred to me there would be an easy command/shortcut to achieve the same objective, without waiting for the often time long reboot. All you need to do is click:
CTRL + ALT + BACKSPACE
This will restart your X, so make sure you’ve saved everything you’re currently working on!
March 31st, 2010
No Comments
In a simple post, my CentOs 4.6 default shell is BASH when I log in as root. I finally got tired of manually switching to csh with the ‘csh’ command. My goal was to set the default shell of Centos 4.6 to CSH. The solution was simple and I wish I had done it earlier.
- Login to CentOs as root
- Open file /etc/passwd with the command “vi /etc/passwd” from the terminal
- My first line said: root:x:0:0:root:/root:/bin/bash
Change it to root:x:0:0:root:/root:/bin/csh
- Save and close the file.
- Restart and your default will now be csh.