msyql show processlist 详解

mysql> SHOW FULL PROCESSLIST;
+——+——+———————+———-+———+——+———-+———————–+
| Id | User | Host | db | Command | Time | State | Info |
+——+——+———————+———-+———+——+———-+———————–+
| 2861 | root | 123.113.92.83:61112 | xiaoshuo | Sleep | 6 | | NULL |
| 2874 | root | 123.113.92.83:61348 | xiaoshuo | Sleep | 976 | | NULL |
| 3418 | root | localhost | xiaoshuo | Query | 0 | starting | SHOW FULL PROCESSLIST |
| 3557 | root | 123.113.92.83:59527 | xiaoshuo | Sleep | 2 | | NULL |
| 3558 | root | 123.113.92.83:59528 | xiaoshuo | Sleep | 2 | | NULL |
| 3560 | root | 123.113.92.83:59621 | xiaoshuo | Sleep | 0 | | NULL |
| 3561 | root | 123.113.92.83:59627 | xiaoshuo | Sleep | 5 | | NULL |
+——+——+———————+———-+———+——+———-+———————–+
7 rows in set (0.00 sec)

Read More

beanstalkd

参考文章:
http://www.hulkdev.com/posts/think_in_beanstalkd
https://itbilu.com/other/relate/VkBat8I-X.html
http://www.fzb.me/2015-7-31-beanstalkd-faq.html

Read More

ZendOpcache

Zend Opcache 已经整合到 php 5.5 中,使用php -v 查看是否已经启用使用下列推荐设置来获得较好的 性能:

Read More

php身份证正则

public static function idCard($idcard){ return strlen($idcard) == 15 ? substr_replace($idcard,”****”,8,4) : (strlen($idcard) == 18 ? substr_replace($idcard,”**********”,4,10) : $idcard);

Read More

php手机号正则

public static function isPhone($isPhone)
{

if (preg_match(‘/^1[3458][0-9]{9}$/’, $isPhone)) {

return true;

} else {

return false;
}

}

Read More

微信js sdk

  $nowUrl = ‘http://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[“REQUEST_URI”];
            $weChatModel = D(‘WeChat’);
            $js_wx_config = $weChatModel->get_jsapi_ticket($nowUrl);
            $this->assign(‘nowUrl’, $nowUrl);
            $this->assign(‘js_wx_config’, $js_wx_config);

Read More