# 一些微小的说明

In order to unite my blogs, I decide that this blog will receive no updates from now on and I will move to a new place.

The AOSC way.

——Jeff Bai

# 请不要用验证码玩弄用户

……等等！！为什么只是在本地 validate 一下啊？！（其实还有 validate 和 createCheck 的源码，太懒就不发了）

（再吐槽一句，check code 是什么玩意儿？validation code 很不服气啊！）

1. 加这个验证码是让查的人不那么急，流量不那么拥挤
2. 加这个验证码的目的可能是让用户有机会停下来确认输入的数据是否正确

（但是，人都输入验证码了，谁还会去回头检查输入的数据？）

# 扔掉 Emacs，投奔 JED

JED 是一个更小更快的 Emacs 实现。它用 S-Lang 作为扩展语言而不是 Emacs Lisp。S-Lang 是一个类 C 的脚本语言，作为扩展语言真是太合适不过了。

%%
%% dot jedrc of Mike Manilone
%%

% 快速切换buffer
require("numbuf");

% 行号
LINENUMBERS=2;
public define global_mode_hook (hook_name)
{
toggle_line_number_mode ();
}

% C缩进格式
c_set_style("bsd");
TAB_DEFAULT=4;
USE_TABS=0;

% 配色
set_color_scheme ("black3");

% 无~备份
No_Backups = 1;



jed没有标签窗口，所以tabbar不可能实现，不过有一种变相实现的方法，Buffers->Change Buffer底下不就是Buffer列表吗？我们可以绑定它啊！所以：

setkey("menu_select_menu(\"Global.&Buffers.&Change Buffer\")", "\ez"); % alt+z显示buffer切换菜单

setkey ("next_buffer", "\e^N");

# Linux下ISO处理

## 从光盘搞到映像文件

dd if=/dev/dvd of=[输出文件名]


cd就把dvd替换成cd，是不是很简单？

## 挂载映像文件

sudo mount [映像文件名] [刚才创建的空目录地址]


that's all.

## 卸载

umount 刚才创建的空目录地址

# 无根的根：无名师的Unix心传（Rootless Root: The Unix Koans of Master Foo）补遗

## 无名师与MCSE能者（Master Foo And the MCSE）

Master Foo and the MCSE

Once, a famous Windows system administrator came to Master Foo and asked him for instruction: “I have heard that you are a powerful Unix wizard. Let us trade secrets, that we may both gain thereby.”

Master Foo said: “It is good that you seek wisdom. But in the Way of Unix, there are no secrets.”

The administrator looked puzzled at this. “But it is said that you are a great Unix guru who knows all the innermost mysteries. As do I in Windows; I am an MCSE, and I have many other certifications of knowledge not common in the world. I know even the most obscure registry entries by heart. I can tell you everything about the Windows API, yes, even secrets those of Redmond have half-forgotten. What is the arcane lore that gives you your power?”

Master Foo said: “I have none. Nothing is hidden, nothing is revealed.”

Growing angry, the administrator said “Very well, if you hold no secrets, then tell me: what do I have to know to become as powerful in the Unix way as you?”

Master Foo said: “A man who mistakes secrets for knowledge is like a man who, seeking light, hugs a candle so closely that he smothers it and burns his hand.”

Upon hearing this, the administrator was enlightened.

## 无名师与命令行工具（Master Foo and the Shell Tools）

“然，于文本之处理有相同之物：sed、awk与Perl何也？于Unix大道孰可制成至佳？”

A Unix novice came to Master Foo and said: “I am confused. Is it not the Unix way that every program should concentrate on one thing and do it well?

Master Foo nodded.

The novice continued: “Isn't it also the Unix way that the wheel should not be reinvented?

Master Foo nodded again.

Why, then, are there several tools with similar capabilities in text processing: sed, awk and Perl? With which one can I best practice the Unix way?

Master Foo asked the novice: “If you have a text file, what tool would you use to produce a copy with a few words in it replaced by strings of your choosing?

The novice frowned and said: “Perl's regexps would be excessive for so simple a task. I do not know awk, and I have been writing sed scripts in the last few weeks. As I have some experience with sed, at the moment I would prefer it. But if the job only needed to be done once rather than repeatedly, a text editor would suffice.

Master Foo nodded and replied: “When you are hungry, eat; when you are thirsty, drink; when you are tired, sleep.

Upon hearing this, the novice was enlightened.

## 无名师与老手（Master Foo and the Old Hand）

“师，吾忐忑至深。吾幼，人皆追随Unix大道，其软件若ed，mailx之简明、无碍。今，其用vim与mutt。明，吾惧其欲用KMail与Evolution，Unix欲为Windows矣。其臃肿且图形之界面之多。”

An experienced Unix programmer, hearing of Master Foo's wisdom, came to him for guidance. Approaching the Master, he bowed three times and said:

Master Foo, I am gravely troubled. In my youth, those who followed the Great Way of Unix used software that was simple and unaffected, like ed and mailx. Today, they use vim and mutt. Tomorrow I fear they will use KMail and Evolution, and Unix will have become like Windows — bloated and covered over with GUIs.

Master Foo said: “But what software do you use when you want to draw a poster?

The programmer replied: “I...have never done that. But I am sure that I could use LaTeX or pic to accomplish it without GUIs, in the proper Unix way.

Master Foo then said: “Which one will reach the other side of the river: The one who dreams of a raft, or the one that hitchhikes to the next bridge?

Upon hearing this, the programmer was enlightened.

## 无名师与傻瓜新手（Master Foo and the Nervous Novice）

（虚位以待）

There was a novice who learned much at the Master's feet, but felt something to be missing. After meditating on his doubts for some time, he found the courage to approach Master Foo about his problem.

Master Foo,” he asked “why do Unix users not employ antivirus programs? And defragmentors? And malware cleaners?

Master Foo smiled, and said “When your house is well constructed, there is no need to add pillars to keep the roof in place.

The novice replied “Would it not be better to use these things anyway, just to be certain?

Master Foo reached for a nearby ball of string, and began wrapping it around the novice's feet.

What are you doing?” the novice asked in surprise.

Master Foo replied simply: “Tying your shoes.

Upon hearing this, the novice was enlightened.

## 无名师论返回Windows（Master Foo Discourses on Returning to Windows）

A student said: “We have learned that Unix is not just an operating system, but also a style of approaching problems.

Master Foo nodded in agreement.

The student continued: “Then, the Great Way of Unix can be applied on other operating systems?

Master Foo sat silent for a moment, then said: “In every operating system there is a path to the Great Way, if only we can find it.

The student continued: “What, then, of Windows? It is preinstalled on most computers, and though its tools are mostly far inferior, they are easy to use for beginners. Surely, Windows users could benefit from the Unix philosophy.

Master Foo nodded again.

The student said: “How, then, are those enlightened in the Unix Way to return to the Windows world?

Master Foo said: “To return to Windows, you have but to boot it up.

The student said, growing agitated: “Master Foo, if it is so easy, why are there so many monolithic and broken software packages for Windows? Elegant software should also be possible with a GUI and fancy colors, but there is little evidence that this occurs. What becomes of an enlighted one who returns to Windows?

Master Foo: “A broken mirror never reflects again; fallen flowers never go back to the old branches.

Upon hearing this, all present were enlightened.

# VBS简单的文件下载器

Dim sURL, sPath

sURL = InputBox("下载文件的网址是？")
sPath = InputBox("存储的文件名是？")
Set xPost = createObject("Microsoft.XMLHTTP")
xPost.Open "GET",sURL,0
xPost.Send()
Set sGet = createObject("ADODB.Stream")
sGet.Mode = 3
sGet.Type = 1
sGet.Open()
sGet.Write(xPost.responseBody)
sGet.SaveToFile sPath,2