Friday, May 14, 2010

mysql add chinese support

mysql> alter table compounds add CNameCN varchar(255) CHARACTER SET gb2312 after CName;

Thursday, May 13, 2010

Block brute force attacks with iptables

    8  sudo iptables -D INPUT 1
    9  sudo iptables -L
   10  sudo iptables -D INPUT 1
   11  sudo iptables -L
   12  sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
   13  sudo iptables -L
   14  sudo iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 8 --rttl --name SSH -j DROP

apache support chinese charset

.htaccess

AddType text/html;charset=gb2312 html php

============
cg@SS$ sudo apt-get install xfonts-intl-chinese



centos chinese support

 1021  yum groupinstall "Chinese Support"

Tuesday, April 27, 2010

linux script to print out memory size

head -n1 /proc/meminfo | awk '

  BEGIN {}
  { TOTAL  = $2;  }

  END {

    print "Total memory: " TOTAL;

  }'

Thursday, April 22, 2010

remove "Antispyware soft" virus

1, The virus is in this folder
%Documents and Settings%\[UserName]\Local Settings\Application Data\[random characters ]\[random characters]tssd.exe
C:\Documents and Settings\Chang\Local Settings\Application Data

You cannot delete this folder, but you can change the folder name.
Try to rename the folder and reboot your pc.

2, reboot your pc and go to safe mode

3, update your regedit
Here is the reference link:
http://www.2-viruses.com/remove-antispyware-soft

4, fuck  Antispyware soft