Changes with nginx 1.1.14 30 Jan 2012
) Feature: multiple "limit_req" limits may be used simultaneously.
) Bugfix: in error handling while connecting to a backend. Thanks to Piotr Sikora.
) Bugfix: in AIO error handling on FreeBSD.
) Bugfix: in the OpenSSL library initialization.
) Bugfix: the "proxy_redirect" directives might not be correctly inherited.
) Bugfix: memory leak during reconfiguration if the "pcre_jit" directive was used.
分类: 技术源码
关闭WordPress日志评论功能的一种方法(已测试)
近期,不知道咋回事,垃圾评论铺天盖地,根本没时间审核,找到了一种方法,可以关闭多少天以前的评论,现记录在此供大家学习使用
修改主题模板文件 functons.php ,加入一个新function
function close_comments( $posts ) {
if ( !is_single() ) { return $posts; }
if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( 30 * 24 * 60 * 60 ) ) {
$posts[0]->comment_status = 'closed';
$posts[0]->ping_status = 'closed';
}
return $posts;
}
add_filter( 'the_posts', 'close_comments' );
以上30的单位是天,可以按需修改。
——-新版本的wordpress已经带超时评论关闭功能了,在设置里的讨论选项里,大家可以发掘一下
nginx 发布 1.1.13
Changes with nginx 1.1.13 16 Jan 2012 *) Feature: the "TLSv1.1" and "TLSv1.2" parameters of the "ssl_protocols" directive. *) Bugfix: the "limit_req" directive parameters were not inherited correctly; the bug had appeared in 1.1.12. *) Bugfix: the "proxy_redirect" directive incorrectly processed "Refresh" header if regular expression were used. *) Bugfix: the "proxy_cache_use_stale" directive with "error" parameter did not return answer from cache if there were no live upstreams. *) Bugfix: the "worker_cpu_affinity" directive might not work. *) Bugfix: nginx could not be built on Solaris; the bug had appeared in 1.1.12. *) Bugfix: in the ngx_http_mp4_module.
基本上还是一个BUG修复版本
shell 命令行下光标移动操作快捷键
放在这里免得忘了,C代表Ctrl,+ 就是一起按的意思
C+l 清屏命令
C+a 移动光标到行首
C+e 移动光标到行尾
C+h 往后删除一个字符
C+d 往前删除一个字符
C+b 往后移动一个字符
C+f 往前移动一个字符
C+w 剪切前一个单词(空格间隔的字符串单元)
C+u 剪切到行首
C+k 剪切到行尾
C+r 查找历史执行命令
C+p 前一条指令
C+n 后一条指令
nginx 1.1.12释出,圣诞节也不安生
Changes with nginx 1.1.12 26 Dec 2011
*) Change: a "proxy_pass" directive without URI part now uses changed
URI after redirection with the "error_page" directive;
Thanks to Lanshun Zhou.
*) Feature: the "proxy/fastcgi/scgi/uwsgi_cache_lock",
"proxy/fastcgi/scgi/uwsgi_cache_lock_timeout" directives.
*) Feature: the "pcre_jit" directive.
*) Feature: the "if" SSI command supports captures in regular
expressions.
*) Bugfix: the "if" SSI command did not work inside the "block" command.
*) Bugfix: the "limit_conn_log_level" and "limit_req_log_level"
directives might not work.
*) Bugfix: the "limit_rate" directive did not allow to use full
throughput, even if limit value was very high.
*) Bugfix: the "sendfile_max_chunk" directive did not work, if the
"limit_rate" directive was used.
*) Bugfix: a "proxy_pass" directive without URI part always used
original request URI if variables were used.
*) Bugfix: a "proxy_pass" directive without URI part might use original
request after redirection with the "try_files" directive;
Thanks to Lanshun Zhou.
*) Bugfix: in the ngx_http_scgi_module.
*) Bugfix: in the ngx_http_mp4_module.
*) Bugfix: nginx could not be built on Solaris; the bug had appeared in
1.1.9.
nginx 1.1.11 开发版释出
Changes with nginx 1.1.11 12 Dec 2011
*) Feature: the "so_keepalive" parameter of the "listen" directive.
Thanks to Vsevolod Stakhov.
*) Feature: the "if_not_empty" parameter of the
"fastcgi/scgi/uwsgi_param" directives.
*) Feature: the $https variable.
*) Feature: the "proxy_redirect" directive supports variables in the
first parameter.
*) Feature: the "proxy_redirect" directive supports regular expressions.
*) Bugfix: the $sent_http_cache_control variable might contain a wrong
value if the "expires" directive was used.
Thanks to Yichun Zhang.
*) Bugfix: the "read_ahead" directive might not work combined with
"try_files" and "open_file_cache".
*) Bugfix: a segmentation fault might occur in a worker process if small
time was used in the "inactive" parameter of the "proxy_cache_path"
directive.
*) Bugfix: responses from cache might hang.
关于正则表达式中的 “?”
这个问号有两层意思
一为匹配前面的子表达式零次或一次。例如,"do(es)?" 可以匹配 "do" 或 "does" 中的"do" 。? 等价于 {0,1}。
二为当该字符紧跟在任何一个其他限制符 (*, +, ?, {n}, {n,}, {n,m})
后面时,匹配模式是非贪婪的。非贪婪模式尽可能少的匹配所搜索的字符串,而默认的贪婪模式则尽可能多的匹配所搜索的字符串。例如,对于字符串 "oooo",’o+?’ 将匹配单个 "o",而 ‘o+’ 将匹配所有 ‘o’。
所以 (.*?)中问号的含义应匹配第二种解释,就是非贪婪模式,最小匹配原则
最近有点迷登山,测试手持GPS
nginx 1.1.10 开发版 11月30日放出
Changes with nginx 1.1.10 30 Nov 2011
*) Bugfix: a segmentation fault occured in a worker process if AIO was
used on Linux; the bug had appeared in 1.1.9.
SecureCRT for Mac OS X 6.7.3(build 292) 破解补丁
使用方法:
从官方下载安装 6.7.3 版本的SecureCRT并安装。 下载地址:https://115.com/file/aq5ymxbb
由于ipatch bug,在打补丁前需要手动在终端执行以下命令:
sudo chmod -R 777 /Applications/SecureCRT.app/Contents/MacOS
点击"select Application"选择已经安装好的SecureCRT.app
或者直接拖拽进Patch程序等待Patch完成。
然后使用补丁内附带的序列号选择手工注册。
Enjoy It!
点击进入输入注册信息界面
直接点击continue 进入报错界面
点击“Enter License Manually”进入手动输入注册信息界面
输入补丁附带的注册信息
输入序列号和license
输入issue date
注册完成。
补丁下载:
https://115.com/file/cl07tts9
注意,用了这个patch后,你会发现,居然密码不能保存了,怎么办怎么办?
嗯,微博上看到素包子说:把keychain禁用就OK了。于是乎,就搞定了
如何禁用:
在全局设置(GLobal Options)->Terminal->Advanced-> 看到右侧的Mac Options了没?把Use Keychain前的勾去掉就OK了。good luck