Adding RedHat DVD as Repository
When we try out a new linux OS its always a pain to download and install all the software we needs on that. Its even worse if you don’t have an unlimited connection. But actually most of the software we need is already there in the CD/DVD in which the operating system comes with. So how do we install from the DVD then rather than from the internet?
For this you need to add the DVD as a repository so that rpm client picks up the rpm from the DVD and wont go to internet for it.
The Procedure and Files to be modified is a bit different for each OS so i will cover Red Hat Linux in this post.
In RHEL the repo list is maintained in the folder /etc/yum.repos.d/ . So lets create a new file in this directory , say lets call it rhel-cd.repo.
The Contents of this file should be as follows:
[rhel-cd] name=Red Hat Enterprise Linux $releasever - $basearch - CD baseurl=file:///media/RHEL/Server/ enabled=1 gpgcheck=0
First line ([rhel-cd]) should be an unique value ie no two repo file should have the same value or it will show a warning.
Change Timezone in Linux from command lineHow to Save file in vi not opened with sudo
Script for Auto Copying of Cds/Dvds
Microsoft Servers in Linux
Copy in Linux with Ui
How to Format a Usb in Linux
Reminder for Gnome Panel
Backend For Panel Reminder
Restoring the Grub after reinstalling Windows
Birthday Reminder For Gnome Panel
Google Buzz Bug-Weird Comments
Google has come up with new feature in Gmail called Google Buzz. I saw a few of the privacy concerns on the initial week it came itself and it was said all this concerns have been fixed by the weekend itself.So I was trying it out and how it works when I noticed a bug in the way it works.
Adding RedHat DVD as RepositoryChange Timezone in Linux from command line
Tab Feature in Vim
Simplest way to remove trailing zeros of decimal numbers
Customizing Mysql Prompt For multiple Servers
Tab Feature in Vim
Vim is one of the simplest looking but most powerful editor I have seen. So thought of listing a few interesting one that I came across.
Tab Opening of Files.

There are two methods of starting files in tabs. Read the rest of this entry »
Adding RedHat DVD as Repository
Change Timezone in Linux from command line
Google Buzz Bug-Weird Comments
Tab Feature in Vim
Change Timezone in Linux from command line
Changing the timezone in linux is done in a weird method. There is no configuration file where you can edit and change timezone. The method is simple and very easy. You need to link to the timezone you need. Find the timezone file you need in /usr/share/zoneinfo/. Go to correct folder and find the place nearest to you( or with the correct timezone). Now link it to the /etc/localtime with the following command example
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtimeAdding RedHat DVD as Repository
How to Save file in vi not opened with sudo
Script for Auto Copying of Cds/Dvds
Microsoft Servers in Linux
Copy in Linux with Ui
How to Format a Usb in Linux
Reminder for Gnome Panel
Backend For Panel Reminder
Restoring the Grub after reinstalling Windows
Birthday Reminder For Gnome Panel
Simplest way to remove trailing zeros of decimal numbers
This is a simple method I found to remove trailing zeros of a decimal number. The function accepts the decimal number and return the trimmed value back. It removes all the redundant zeros in the number after the decimal point and if no number other than zero is present after the decimal point the decimal point too is removed.
function clean_num($num){
return trim(trim($num, '0'), '.');
}
The code is written in php but can be converted to any other language by writing trim function also.
Fix link issue in Twitter client of Fusion themeAdding RedHat DVD as Repository
Change Timezone in Linux from command line
Google Buzz Bug-Weird Comments
Tab Feature in Vim
Customizing Mysql Prompt For multiple Servers
If you are using mysql regularly on multiple servers its really useful to have the promt in mysql to show something more than mysql>. It would be useful if it showed the username,hostname, current database and things like that.
So how to do this.
Change Timezone in Linux from command line
Google Buzz Bug-Weird Comments
Tab Feature in Vim
Simplest way to remove trailing zeros of decimal numbers
How to Save file in vi not opened with sudo
Posted by Srijith R in linux, shell scripting, vi on December 26, 2009
It has happened to me a lot of times that i edit a file in vi. I insert and edit a lot and finally when I try to save it I find that I dont ahve permission for it. If only I had opened it with sudo. I found a solution for this issue. It was actually a simple command and here it is
:w !sudo tee %
Just use the above command in command mode in vi and that’s it and it will ask for reloading the file and then reload it and exit it using :q!
because we have already written to the file and no need to save the file again.
Try it out and tell me.
Change Timezone in Linux from command line
Script for Auto Copying of Cds/Dvds
Microsoft Servers in Linux
Copy in Linux with Ui
How to Format a Usb in Linux
Reminder for Gnome Panel
Tab Feature in Vim
Restoring the Grub after reinstalling Windows
Birthday Reminder For Gnome Panel
Fix link issue in Twitter client of Fusion theme
When I tried out the Twitter client in fusion theme I noticed that the urls are wrong in that client. The URL in my client were like http://blog.sriunplugged.com/”http://search.twitter.com/search?q=%23Home” . So after a bit of digging into I found that the file wp-content/themes/fusion/functions.php contains the php code for generating the contents of widget. So the issue was that it was echoing the contents as such after getting from twitter. So Twitter already has quotes in the link this was the one that was making link wrong. So the fix was a small. Insert into the function fusion_TwitterWidget() the line mentioned below
Update: I edited the function again to add my twitter link too.
function fusion_TwitterWidget($args){
extract($args);
echo $before_widget;
print $before_title.__('<a href="http://www.twitter.com/'.get_option('fusion_twitterid').'">Twitter posts</a>','fusion').$after_title; ?>// edit this for adding link to twitter account
Simplest way to remove trailing zeros of decimal numbersAdding RedHat DVD as Repository
Change Timezone in Linux from command line
Google Buzz Bug-Weird Comments
Tab Feature in Vim