<job id="main">
<script language="JScript">
// Note: This script will not function correctly with non-ANSI Encoding files.
// ################################ Settings ####################### /
// File's extension
var extensionReg = /^.+\.(xml|txt)$/ig;
// Replace rules
// The replacePair Array contains multiple replacement rule objects.
// Each object contains reg and str property.
// The reg property is a Regular Expression
// and the str property replaces every successful match of reg.
var replacePair = [{reg:/\[^<>]*\<\/value\>/ig, str:"###value###"},
{reg:/\
I often connect to my blog’s mysql host, do some query, and delete comment spams. At first I used a UI mysql administrator(mysql administrator and navicat), but I found it so slowly and I could not bear it.
So I changed to use command line, it became fast immediately. But typing the command everytime is tired, you could use the following windows script to do this automatically.
<job id="main">
<script language="JScript">
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.Run("cmd.exe");
WScript.Sleep(500);
WshShell.AppActivate("cmd.exe");
WScript.Sleep(200);
WshShell.SendKeys ("mysql -h ip_address -u user_name -p{ENTER}");
WScript.Sleep(500);
WshShell.SendKeys ("password{ENTER}");
WScript.Sleep(5000);
WshShell.SendKeys ("use your_schema{ENTER}");
WScript.Sleep(3000);
// WshShell.SendKeys ("show tables;{ENTER}");
// WScript.Sleep(4000);
WshShell.SendKeys ("delete from wp_comments where comment_author_ip = \'194.8.75.149\';{ENTER}");
WScript.Sleep(2000);
WshShell.SendKeys ("delete from wp_comments where comment_author_ip = \'66.232.103.247\';{ENTER}");
WScript.Sleep(2000);
WshShell.SendKeys ("delete from wp_comments where comment_author_ip = \'194.8.75.163\';{ENTER}");
WScript.Sleep(2000);
WshShell.SendKeys ("quit{ENTER}");
</script>
</job>
现在即使是自己一个人开发也已经离不开版本管理工具了,没有版本管理很不方便。
在自己机子上建个SVN Repository自己用。
安装TortoiseSVN后一切变得超简单,在一个空目录右键TortoiseSVN–>Create Repository Here搞定。本地访问版本库使用file:///D:/SVNRepository/这样的URL就可以了,在局域网还可以把此目录共享,使用file://ServerName/path/to/repos/连接版本库。
如果不只是局域网使用,那么建个Apache Server吧(TortoiseSVN Help — Setting up a server — Apache Based Server),或者干脆使用Google Code有点慢。