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;
... ...

}

http://m.douban.com/note/266468855/

 iPhone如何截图?iPhone如何强制退出软件?iPhone如何进入恢复模式?相信许多新果迷都会存在这些困扰。其实这些操作都可以通过快捷键轻松完成。这里,iTools为大家网罗了许多你未必知道的iOS人性化快捷操作。

1.手机重启
想要重启手机,不用长按Power键滑动关机,然后又再长按Power键开机那么复杂。在iPhone开机状态下同时按Power+Home键保持7秒(期间会出现关机滑块),出现白色苹果标志的时候就开始重启了,此时松开Power和Home键即可。

- 阅读剩余部分 -