Thursday, February 3, 2011

Solution : raise TypeError("bufsize must be an integer")

Error : subprocess.call(['vim'],['/home/patelm/.bashrc'])

Solution: subprocess.call(['vim','/home/patelm/.bashrc'])


Whenever you're running subprocess.call and you see this
error, say to yourself: "Have I passed the command line
as one parameter in a list; or have I passed it as a series
of parameters?"

Wednesday, February 2, 2011

diff rcs file

Code:
rcsdiff -r1.1 -r1.2 -u file

here we are diffing rev 1.2 agains 1.1


If you want to colour the output you can use the idiff script


Code:
rcsdiff -r1.1 -r1.2 -u file | ./idiff

Friday, January 28, 2011

How to view content of RPM package

use following switch

--filesbypkg
    List all the files in each selected package.

rpm -q -filesbypkg -p filename.rpm

Wednesday, January 12, 2011

Word 2007: Password Protect Your Document File

1. Click the Microsoft Office Button, and then click Save As.
2. Click Tools, and then click General Options.
3. You can type a password in Password to open or Password to modify.
4. Click OK.
5. When prompted, retype your passwords to confirm them, and click OK.
6. Click Save.

ref:- http://www.technipages.com/word-2007-password-protect-your-document-file.html

Wednesday, December 1, 2010

Solution :called too early to check prototype at in Perl

one of the way shis can happen if

you have declared function as

sub fun()
{

}


In perl you should declare function as

sub fun
{

}


- mihir patel

Tuesday, November 23, 2010

Monday, November 15, 2010

Solution: sudoers file: syntax error, line xx

When using no password you may be thrown a error
ex.
>>> sudoers file: syntax error, line xx <<<
sudo: parse error in /etc/sudoers near line xx


Solution :
if you are giving a single command then just add a comma

user ALL=command, NOPASSWD: ALL

instead of ( This will be throwing an error)

user ALL=command NOPASSWD: ALL

[SOLVED] Can't use sudo + /etc/sudoers +RHEL 5 +nopasswd

When using no password you may be thrown a error
ex.
>>> sudoers file: syntax error, line xx <<<
sudo: parse error in /etc/sudoers near line xx


Solution :
if you are giving a single command then just add a comma

user ALL=command, NOPASSWD: ALL

instead of ( This will be throwing an error)

user ALL=command NOPASSWD: ALL

Monday, November 8, 2010

Solution : NotePad++ tabs to spaces

In version 5.6.8 (and above):

Settings -> Preferences... -> Language Menu/Tab Settings -> Tab Settings (group) -> Replace by space


In previous versions(5.6.7 and bellow):

Settings -> Preference -> Edit Components (tab) -> Tab Setting (group) -> Replace by space


- Mihir Patel