最近再写web端的一个client, 要用到spring+tomcat. 虽然小白很强大,但是运行起eclipse+j2ee的插件, 在打开自动deployment, 还是很慢. 于是乎只能是用eclipse编写程序, iTerm里用ant deploy, 其次还要看tomcat的log. 每次开始编程前大致要做的共有12步, 用script或是alias的话8步. Don’t Repeat Yourself! 鉴于在目前project里得来的经验, 一切要做多于3次的, 重复劳动都因该自动化.  开始着手自动化这些工作, 开始买mac的原因之一就是听说applescript很简单, 很强大. 买来了倒是一次没有用过, 罪过阿,罪过. 这次正好实验一下. 外事不决问google, 几次查找之后找到了如何在applescript里调用iTerm和safari. 一个小时连学代写搞定了整个process — A sample iTerm Applescript tell application “iTerm” activate — close the first session terminate the first session of the first terminal — make a new terminal set daterm [...]