Archive for the Uncategorized Category

How to remove “Antivirus System Pro” spyware

Posted in Uncategorized with tags on November 15, 2009 by harryche2008

Just this morning when I browsed some sites, my computer got infected by this software program called “Antivirus System Pro”. Spent a little time and finally got rid of it. There is how:

1. Restart Windows XP in safe mode

2. Remove files named “letqsysguard.exe”, and its parent directory “nxbrrd”, or whatever it happens to end up under.

3. Launch regedit, and search for “nsarkinfo”, or just “letqsysguard.exe”, and remove any registry entries that match it.

4. Goto /Windows/system32, and remove a dll called “iehelper.dll”, which hijacks your IE browser whenever you go to a site.

5. Reboot and everything should be back to normal, hopefully.

After throught: perhaps it makes sense to disable Java engine from ever running in your browser, as that seems to be where many spywares get to your system through a web page.

testing

Posted in Uncategorized on August 12, 2009 by harryche2008

Free resources, techniques, and tips for goal setting

Posted in Uncategorized on June 21, 2009 by harryche2008

Free resources, techniques, and tips for goal setting to help you achieve all you want in life.
Visit http://www.Goal-Setting-Resources.com

WordPress fix for “Error establishing a database connection”

Posted in Uncategorized with tags on January 27, 2009 by harryche2008

If you have googled everywhere and tried everything, still not working, try this:

change “localhost” to “127.0.0.1″.

It worked for me.

Attachment fu’s “Size is not in the list” problem

Posted in Uncategorized on December 23, 2008 by harryche2008

The fix is to specify :min_size config for has_attachment call:

 has_attachment :content_type => :image,
                 :storage => :file_system,
                 :max_size => 10.megabytes,
         :min_size => 0.kilobytes,
         :resize_to => ‘320×320>’,
                 :thumbnails => { :thumb => ‘126×126>’ }

How to fix “no file to load …” errors when installing Substruct shopping cart code

Posted in Uncategorized on August 26, 2008 by harryche2008

If you’re using substruct, and installing the code following the installation directions given on its website, you may run into problems like “no file to load xxx” errors when trying to initialize the databases by running:

rake substruct:db:bootstrap

The problem is that some of the files that come along with the source have wrong file extention names, like ../extract_options.rb0000644, which really should be ../extract_options.rb, without those weird numbers. I don’t know how it got in there. But once you corrected those file names, then everything should be fine.

Problem with installing Image Science

Posted in Uncategorized on July 30, 2008 by harryche2008

When installing Image Science, it requires FreeImage and Rubyinline. When installing FreeImage, ‘make’ reports some error saying no g++ found.

To install g++, on CentOS, do this:

yum install gcc-c++

Solution to ftp login problem with CentOS vsftp server

Posted in Uncategorized on July 29, 2008 by harryche2008

Sometimes after starting vsftpd service, you still can’t login through ftp. You keep getting errors like:

500 cannot change home directory to …

The problem is with security policy, you need to make sure “Allow ftp to read/write in the user home directories” is checked.

Or, just use

/usr/sbin/setsebool -P ftp_home_dir 1

A few simple ways to debug Javascript code

Posted in Uncategorized on July 25, 2008 by harryche2008

Beyond alert() boxes, here a few very simple ways to debug your javascript code in an Ajax app:

1. Log messages within your js code.
In your html page where js code is running, define perhaps a div for keeping a log of messages that you can append to in your js code, then you can insert this line anywhere in your code, e.g:

$(‘log’).innerHTML += “User entered ” + sUserInput;

Then you can easily show or hide the log by applying a css style to the div tag.

2. Use a logging library, such as Lumberjack or log4js.

3. Venkman debugger

How to run Rails code as a cron job?

Posted in Uncategorized on July 23, 2008 by harryche2008

Rails comes with a script/runner script that can be used to run a specific snippet of code in your Rails app. There’re many ways to organize your code to let this runner script execute it, but one obvious way is to write the code as a model’s action. Here are quick steps for doing this:

1. Insert your code into an action of a model, i.e. MyModel.DoThisThing, DoThisThing must be defined as class method, “def self.DoThisThing…”

2. In your cron job, add a line to run this at certain interval:
/usr/local/bin/ruby /path/to/your/app/script/runner -e production "MyModel.DoThisThing"

Change the ruby path on your system if different.