Category Archives: technology

Sync with nist time during windows startup

I have problem with my old PC. The battery is not working anymore. So time is not saved when PC is off. This is alternative for me to keep the PC time up to date by sync the time with nist time during start up.

First you need to set the nist time in your time setting.
– double click the time on bottom left
– choose internet time
– check the “Automatically synchronize with …”
– choose time.nist.gov from the drop down
– press ok

Create a batch file (.bat) that contains this command
w32tm /resync

and save it in C: (e.g. timesync.bat)

Create short cut of the file in your Start > All programs > Startup

With this every time your computer is turned on, your PC local time will be synced with nist internet time.

How many site does his site receive?

Maybe that’s the question you ask on your competitor’s website? Basically it’s hard to know unless the website’s owner tell you, display the stats on their website or you can get into their system.

But with this tool at least you can estimate how many visitors they receive in a day. I’ve tried with few sites of mine and it come quite close to the real stats.

http://www.sitereport.org/p/domainnamehere.com

Have it a try!

My wordpress blog got hacked!

Suddenly two of my blogs could not be viewed. It was blank and another one display the “Warning: Visiting this site may harm your computer!” when browse with Google Chrome.

What I did to recover..

1. Remove the injected script in infected files (this can be checked in the error log file)

2. Login to my wordpress and export all content and save it on my PC

3. Download all my images in wp-content/uploads folder

4. Totally remove the wordpress

5. Do fresh installation with latest wordpress version available in Fantastico

6. Upgrade wordpress to latest version available with auto update feature

7. Make sure I don’t use “admin” as username for my blog and password at least 8 character long consists of aplhabet, number and special characters.

8. Install only neccessary and trusted plugins and themes. Immediately update plugins if new version available

9. Import all the files with import feature in tools

10. Copy back all the images to wp-content/uploads folder. Better check first to ensure no unwanted files in the folder.

Other than that..

1. Scan PC for virus and malware

Kill those malwares/virus

Lots of new virus and malware nowadays. Keep your PC safe with these tools

AVG Free

Malwarebytes Anti-Malware

Another thing, try avoid using Internet Explorer. Google Chrome can better protect you from infected websites.

If you are using open source application like wordpress. Ensure that

  • you are using the latest version
  • your password is secure with at least 8 alphanumeric character with mix of special character and lower/upper case character
  • you are using 3rd party plugins/themes from only reliable sources
  • if possible try remove standard footer and header generated by the application (please read the terms first)

Other tips

  • Don’t login to your web application in public and unsecure place or PC’s like in cyber cafe etc
  • If you suspect your account was hacked, immediately change the password and inform your system admin or hosting/technical support

Updated: Don’t eve save password in FTP client application like Filezilla. They save your password in flat file and easily read by any other application

How to remove wuauclt in your processes list

I had problem with my other PC (windows xp) that ran very slow. I checked the processes running and found this wuauclt program is running. Tried to kill it but it reappear again.

I did some research on the net and found that the file is windows file for auto update and can’t be removed by kill it in the process list.

The solution is logon your PC via safe mode, find file named wuauclt.exe in c:\windows\system32. Rename it to another file name like wuaucltxxxx.exe. Then restart your PC as normal.

Remove unnecessary space between lines in dreamweaver

Sometimes code in dreamweaver got space in between. This will make your code very lengthy and hard to read. To remove the space you can use this method in Dreamweaver

1. Open the file (source code)
2. Click CTRL + F
3. Select “Current document” in “Find in” (You can also select the folder if you have multiple files)
4. Search in “Source code”
5. Tick “Use regular expression”
6. Type “[\r\n]{2,}” (without quotes) in “Find”
7. Type “\n” (without quotes) in “Replace”
8. Press “Replace All”

You are done! All the spaces gone.

source

Use Gmail with your own domain name

Gmail so far is the best known e-mail service provider. I don’t have to list the features of Gmail here.

If you want to have google powered applications (especially Gmail) but using your own domain, you have come to the right place. You can do that with Google Apps (standard edition)

With standard edition (there is premier edition for big corp), you can create 50 email accounts with 7GB space for free and other standard google applications like docs, calendar, chat and google sites.

Below is the steps to start using Gmail with your very own domain name. Very easy.

1. Start here – list of what you get besides gmail. Click on the “Get Started” button

2. Enter your domain name and other details in the provided form.

3. Create admin account and agree with the term

4. Activate gmail and change MX records in cPanel (you can choose from a list of hosting management applications). change MX in cpanel use following values

Priority Mail Server
1 ASPMX.L.GOOGLE.COM.
5 ALT1.ASPMX.L.GOOGLE.COM.
5 ALT2.ASPMX.L.GOOGLE.COM.
10 ASPMX2.GOOGLEMAIL.COM.
10 ASPMX3.GOOGLEMAIL.COM.

sourceĀ 

At first I thought it was so complicated because I need to change the MX record, then all the A’s records, then CNAME and then other xx records but actually you have to change only MX record and it is in you hosting cPanel (not even in the domain management).

After changing your MX record, you are done. Wait for few hours (sometimes just in few minutes). You can also use all other applications offered as in the intro page.

To log on to your email and other app, just point your browser to

http://www.google.com/a/your_domain_here/
Direct link to email is http://mail.google.com/a/your-domain.com

It is a good idea to make a forwarding or subdomain from your domain to above URL. Easier to remember..

Update: To import all your old emails, you can use mail fetcher by going to Settings > Accounts > Add a mail account you own. Tips for cpanel user, if you are using same email address with same domain, just enter any email address when asked. The important thing is use the real email address in the username. Save and wait while all old emails being fetched.

Hope this article helps. All the best.

For more info, can also check google app setup guide

Full mysql backup with cron job in cpanel

This is how to do daily mysql backup with cron job in cpanel. This cron job will backup your mysql database as dump file (and gzip) daily. The files will be replaced on the same day next week.

Command to run to dump your mysql database, gzip it and replace it the following week as follow

1
mysqldump -uDBUSERNAME -pPASSWORD --opt DBNAME > /home/USER/dbbackup/FILENAME.sql; gzip -f /home/USER/dbbackup/FILENAME.sql

Replace DBUSERNAME, PASSWORD, DBNAME, USER, FILENAME respectively.