http://www.otokaze.cn/post/535.html
v2ex.png
PHP代码稍有修改几处
v2ex_sign.php

<?php
$loginUrl = 'https://www.v2ex.com/signin'; //登录入口 
$v2ex = new v2ex('username','password'); //你的账号密码,请符合v2ex的用户名规范 
if(!is_dir("cookie")){mkdir("cookie",0755);} //检查cookie目录是否存在 
if(!is_file($v2ex->CookiePath)){ //对已有登录状态cookie的账号,程序会自动跳过登陆 
file_put_contents($v2ex->CookiePath,''); 
$v2ex->getOnceAndSession($loginUrl); //获取初始状态的once值以及SESSIONID 
$v2ex->login(); 
} 
$v2ex->getOnce('https://www.v2ex.com',$v2ex->CookiePath); //获得最新Once值,用于签到 
$v2ex->sign('https://www.v2ex.com/mission/daily/redeem',$v2ex->CookiePath); //执行签到步骤 
$v2ex->update(); //更新过期cookie

function __autoload($className){  //自动引入类库
    include $className.'.class.php';
}

- 阅读剩余部分 -

shell判断文件,目录是否存在或者具有权限
#!/bin/sh

myPath="/var/log/httpd/"
myFile="/var /log/httpd/access.log"

# 这里的-x 参数判断$myPath是否存在并且是否具有可执行权限
if [ ! -x "$myPath"]; then
mkdir "$myPath"
fi

# 这里的-d 参数判断$myPath是否存在
if [ ! -d "$myPath"]; then
mkdir "$myPath"
fi

# 这里的-f参数判断$myFile是否存在
if [ ! -f "$myFile" ]; then
touch "$myFile"
fi

# 其他参数还有-n,-n是判断一个变量是否是否有值

- 阅读剩余部分 -

http://www.ingkee.com/s/?ctime=1459668248&uid=11366499&liveid=1459668248060711&share_uid=11366499
https://github.com/racaljk/hosts
https://raw.githubusercontent.com/racaljk/hosts/master/hosts

https://www.nginx.com/blog/thread-pools-boost-performance-9x/
http://www.cnblogs.com/mchina/archive/2013/01/30/2880680.html
http://www.cnblogs.com/allenblogs/archive/2011/05/19/2051136.html

server {

add_header Strict-Transport-Security max-age=31536000 always;

}
server {

ssl_session_cache        shared:SSL:10m;
ssl_session_timeout      60m;

ssl_session_tickets      on;
resolver                 8.8.4.4 8.8.8.8  valid=300s;
resolver_timeout         10s;
... ...

}