- 博客(19)
- 收藏
- 关注
原创 mac pip安装scrapy 报错:Failed building wheel for Twisted
mac pip安装scrapy 报错:Failed building wheel for Twisted可能解决方案:1.xcode-select --install2.pip install scrapy
2018-03-14 08:39:35 1247 1
原创 python学习之str
>>> dir(str)['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__',
2016-08-09 09:38:27 320
转载 NGINX引入线程池 性能提升9倍
NGINX引入线程池 性能提升9倍1. 引言正如我们所知,NGINX采用了异步、事件驱动的方法来处理连接。这种处理方式无需(像使用传统架构的服务器一样)为每个请求创建额外的专用进程或者线程,而是在一个工作进程中处理多个连接和请求。为此,NGINX工作在非阻塞的socket模式下,并使用了epoll 和 kqueue这样有效的方法。因为满负载进程的数量很少(通常每核CPU
2015-07-15 21:00:21 347
转载 mac上访问samba服务器
打开safari输入smb://ip,回车后出现输入用户名密码对话框,若是匿名则选择作为“客人”选项转自:http://blog.chinaunix.net/uid-11121450-id-3375140.html
2015-07-11 17:34:01 1759
原创 SQLSTATE[HY000] [2002] No such file or directory
我的mysql.sock 位置 /usr/local/webserver/mysql/mysql.sockphpinfo() 中 位置处理:ln -s /usr/local/webserver/mysql/mysql.sock /tmp/mysql.sock
2015-07-08 14:19:24 1224
转载 sublime sftp 同步远程文件夹
总结: 本文介绍两种方法,推荐第二种方法(samba+windows映射)先贴出sublime打开远程(Linux)目录所需的配置文件(sublime是通过ssh协议从Linux端下载上传文件,来保持同步的,下边的配置文件一部分就是配置ssh,另一部分配置所要打开的Linux目录){ // The tab key will cycle through the set
2015-07-03 16:12:24 4900
原创 bitnami redmine 3.0.0 页面优化
优化点:1.页面字体大小2.邮件内容字体大小3.右边栏目宽度4.列表行高调整5.主题宽度限制,超出部分显示‘...’,鼠标放上显示完整内容
2015-06-25 09:39:37 2203
原创 lnmp 环境搭建 源代码包安装 linux,nginx,mysql,php
环境:contos 6.5说明:源代码目录:/data/software/soft安装目录:/usr/local/webserver/源代码包: http://pan.baidu.com/s/1kTy3UXh准备:yum -y install gcc automake autoconf libtool makeyum -y install gcc gcc
2015-06-24 15:44:21 688
原创 php 文件缓存类
<?php//文件缓存类Class myfilecache { private $path; private static $instance; private function __construct($path) { $this->path=$path; } public static function getobj($path){ if(!self:
2015-06-24 15:18:14 350
转载 测试301和302转向页面的浏览器缓存情况
在web服务器端(nginx)用rewrite设置跳转rewrite ^/1.htm$ http://www.9enjoy.com permanent;rewrite ^/2.htm$ http://www.9enjoy.com last; http://192.168.1.158:843/1.htm 响应头信息Server n
2015-06-16 09:17:09 7609
转载 shell判断一个字符串是否包含另一个字符串
str='this is a tree! and that is a car.'//如果包含this[[ $str =~ "this" ]] && echo "\$str contains this"//如果不包含that[[ $str =~ "that" ]] || echo "\$str does NOT contain that"
2015-05-21 16:19:18 1425
转载 php编译安装configure 一些参数详解
具体参数含义可以用./configure --help来查看。列表如下(部分参数未得到解释):# 指定 php 安装目录--prefix=/usr/local/php # 指定php.ini位置--with-config-file-path=/usr/local/php/etc # mysql安装目录,对mysql的支持--with-mysql=/usr/loc
2015-05-21 14:19:52 388
原创 php 回调函数
function mysort(&$arr,$fun) { $c=count($arr); for ($i=0; $i < $c; $i++) { for ($j=$i+1; $j < $c; $j++) { $cp=$fun($arr[$i],$arr[$j]); if($cp){ $tmp=$arr[$i]; $arr[$i]=$arr[
2015-05-18 18:02:32 315
原创 hpfinder (linux 文件内容查找 )
可实现在不同目录下的递归查找文件内容详情见:https://github.com/HappyAaron/hpfinder
2015-05-18 16:36:13 396
原创 php 验证码
<?php /** * 获取验证码字符串 * $str 字符串 * $len 长度 * $type 类型 1,数字 2,字母 3,混合 */ function getVStr(&$str,$len=4,$type=1) { $num=range(0,9); $zm=range('a','z'); $str=''; for ($i=0; $i < $l
2015-05-18 13:11:35 305
原创 parse_str 与 http_build_query
$str="uname=liming&age=30"; parse_str($str,$data); var_dump($data); echo http_build_query($data);array (size=2) 'uname' => string 'liming' (length=6) 'age' => string '30' (length=2)u
2015-04-19 17:52:54 340
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人