1、解压 AxureRP-Pro-Setup.exe
2、下载一个 Microsoft .NET Framework Client 4 安装好
3、点击解压后的AxureRP-Pro-Setup.exe
Category Archives: TechNote
利用命名管道实现nginx日志的多时区
一个应用场景需要在同一个机器上产生不同时区的日志。
方法:
建立命名管道,将nginx的日志写到命名管道,然后写个脚本接受命名管道的数据并且将时间转换到对应时区之后再输出到新的日志文件。
需要注意的地方就是要先运行脚本接受命名管道的数据,不然nginx在进行reload的操作的时候会卡住,over。
另外提供一个刚找到的好东西:http://trac.nchc.org.tw/cloud/,看台湾的技术文档实在是件很惬意的事情。
php : variables_order
The presence and order of variables listed in this array is defined according to the PHP variables_order configuration directive.
php.ini : variables_order
Sets the order of the EGPCS (Environment, Get, Post, Cookie, and Server) variable parsing. For example, if variables_order is set to “SP” then PHP will create the superglobals $_SERVER and $_POST, but not create $_ENV, $_GET, and $_COOKIE. Setting to “” means no superglobals will be set.
去掉Vim里的 ^M 方法
dos2unix 一般发行版都会带这个工具。
Vim 里面 替换 \r 为空。
hack redmine 实现自定义未登录跳转
app/controllers/application_controller.rb
130 改为 :format.html { redirect_to ‘http://www.abc.com/’ }
通过SSH Tunnel连接远程数据库
原理很简单:利用SSH Tunnel做个映射。
ssh -L 3307:localhost:3306 one@dbserver
然后用 mysql 连接本地的 3307 端口即可。
参考文章:http://www.whoopis.com/howtos/mysql_ssh_howto.html
一个RewriteCond应用到多个RewriteRule
默认情况下 RewriteCond 只应用到 其紧跟着的 RewriteRule。
手册里有个 RewriteCond backreferences :
http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritecond
貌似可以实现一个RewriteCond应用到多个RewriteRule,不过看了一下不知道怎么用。
Ask Google大神找到了一个老外的解决方案:
http://my.galagzee.com/2009/02/11/mod_rewrite-one-rewritecond-to-many-rewriterules/
RewriteCond %{REQUEST_URI} !^/(pattern1|pattern2|pattern3)(/[0-9]+|/P[0-9]+|)[/]?$ [NC]
RewriteRule . – [S=3]
RewriteRule ^/([^/]*)[/]?$ /index.php/site_embeds/department/$1/X [L]
RewriteRule ^/([^/]*)/([0-9]+)[/]?$ /index.php/site_embeds/article/$2/$1 [L]
RewriteRule ^/([^/]*)/P([0-9]+)[/]?$ /index.php/site_embeds/department_archive/P$2/$1 [L]
RewriteRule 有个 S 参数,可以用来跳过其后续一定数量的规则。
然后对RewriteCond的条件取反,就可以实现了。
CloudFront & edgecast
给Redmine做了一个CDN中转,
CloudFront中国电信是访问到日本的节点,速度比较好。
edgecast访问到美国的节点,速度还可以接受,比较稳定。
不过悲催的是CloudFront不支持POST方法,在POST表单的时候直接返回403错误。
VirtualBSD 8.1
高效操作Bash
Thinking In LAMP : http://www.thinkinlamp.com/ 上海群里,老王分享。
http://ahei.info/bash.htm
还有这个也是可以看看的,讲readline:
http://docs.huihoo.com/homepage/shredderyin/readline.html

