05 2015 档案
摘要:转自:http://benchmarks.ro/2011/02/str_replace-vs-preg_replace/事实证明str_replace确实比preg_replace快。If you find yourself handling strings and replacing sub-st...
阅读全文
摘要:转自:http://cheneyph.iteye.com/blog/824746系统# uname -a # 查看内核/操作系统/CPU信息# head -n 1 /etc/issue # 查看操作系统版本# cat /proc/cpuinfo # 查看CP...
阅读全文
摘要:.bz2 解压1:bzip2 -d FileName.bz2 解压2:bunzip2 FileName.bz2 压缩: bzip2 -z FileName .tar.bz2 解压:tar jxvf FileName.tar.bz2 或tar --bzip xvf FileName.tar....
阅读全文
摘要:将var/Typecho/Common.php中的第939行中的http://www.gravatar.com/中的www.给去掉即可!//修改前$url = $isSecure ? 'https://secure.gravatar.com' : 'http://www.gravatar.com';...
阅读全文
摘要:1,当只要一行数据时使用 LIMIT 1如果明确只取一条数据,要加上limit 1;2,避免 SELECT *,根据需要获取字段应该养成一个需要什么就取什么的好的习惯。3,使用 ENUM 而不是 VARCHARENUM 类型是非常快和紧凑的。在实际上,其保存的是 TINYINT,但其外表上显示为字符...
阅读全文
摘要:附一些常用的正则运算:验证数字:^[0-9]*$验证n位的数字:^\d{n}$验证至少n位数字:^\d{n,}$验证m-n位的数字:^\d{m,n}$验证零和非零开头的数字:^(0|[1-9][0-9]*)$验证有两位小数的正实数:^[0-9]+(.[0-9]{2})?$验证有1-3位小数的正实数:...
阅读全文
摘要:1,显示被修改文件的修改统计信息,添加或删除了多少行。git log --stat2,显示最近两条的修改git log --stat -23,显示具体的修改git log -p -24,显示我自己的修改git log --stat --author=wangkongming5,查看单个文件最近两次...
阅读全文
摘要:转自:http://151wqooo.blog.51cto.com/2610898/1162118如果你想在当前目录下 查找"hello,world!"字符串,可以这样:grep -rn "hello,world!" ** : 表示当前目录所有文件,也可以是某个文件名-r 是递归查找-n 是显示行号...
阅读全文
摘要:转自:http://www.cnblogs.com/jesseZh/p/4036811.html(64位) sudo dpkg -i chmsee_1.3.0-2ubuntu2_amd64.deb 安装软件包,下载地址:http://kr.archive.ubuntu.com/ubuntu/poo...
阅读全文
摘要:博客转自:http://www.01happy.com/linux-access-windows-shares-folders/有时需要在linux下需要访问windows的共享文件夹,可以使用mount挂载或者使用samba连接。1、mount挂载首先创建被挂载的目录:$ mkdir window...
阅读全文
摘要:server { listen 80; server_name blog.localhost; #绑定域名 index index.htm index.html index.php; #默认文件 root /data/webroot/blog;...
阅读全文
摘要:charles是很好的抓包工具。如何安装呢?可以去官网下载:http://www.charlesproxy.com/download/如果是Debian系列的,可以直接用apt-get 安装http://www.charlesproxy.com/documentation/installation/...
阅读全文