ITeye博客

macken

macken · 共 100 篇文章

[置顶] For God's sake, follow your dreams(转)

We were just about getting ready to warm up for the practice game over the weekend when I had an interesting conversation with one of the team mates I actually didn't know quite well. "So what do you do?" he asked. "Well, we work for ourselves, we run a software company", I replied. "Oh really! tha…

2011-10-09 11:58 · 好文章 · 评论(0)

mac下firefox 插件位置

位置 ~/Library/Application Support/Firefox/Profiles/xxxxxx.default/extensions

2014-03-12 15:42 · firefox · 评论(0)

web.xml配置

context-param ServletContext web.xml中配置的加载顺序依次为 context-param->listener->filter->servlet 其中不同配置的加载顺序与文件中的顺序无关,对于同类配置而言,他们的加载与顺序有关; web容器启动时初始化每个filter时,是按照filter配置节出现的顺序来初始化的,当请求资源匹配多个filter-mapping时,filter拦截资源是按照filter-mapping配置节出现的顺序来依次调用 doFilter()方法; Servlet与Filter类似 1.启动web项目,容器会读取web.xml配置文件中…

2014-02-24 17:15 · 评论(0)

web测试学习内容简要

web测试概览 http://developer.51cto.com/art/200807/83518.htm 初级书籍(了解掌握http协议、web基本原理): http://product.dangdang.com/22840157.html http://product.dangdang.com/20786688.html 关注点:测试基本理论、理解HTTP基本原理、功能测试、单元测试、浏览器兼容性测试; 中高级书籍(自动化测试、性能测试): http://product.dangdang.com/21083424.html http://product.dangdang.com/22…

2013-11-25 20:47 · 评论(0)

centos6.4安装

今天打算上午装一个先下的centos测试机器,选择了最新的centos 6.4,主机没有光驱,公司也没用外置光驱,于是苦逼的一天开始了,一直装到现在才搞定,NND,以后他妈再也不自己装系统了。 网上的教程是大多是使用UltraISO来制作u盘启动盘,然后进行安装,在装centos6时会遇到一个问题就是iso文件大于4G,u盘启动盘必须是fat32系统,因此无法放下整个iso文件,这样就必须进行阉割,删除其中的一个lib包,然后再放到启动盘里面,这样就会在安装的时候遇到一个 error,"unable to read group information from repositories“,悲…

2013-11-19 18:01 · linux · 评论(1)

linux常用命令(不断更新)

1.查看系统运行情况 top 数字1 查看各个cpu运行情况 2.查看内存使用 free free -m 具体进程占用内存可看 cat /proc/pid/statm http://os.51cto.com/art/201005/202420.htm 3.测试udp端口是否打开 nc -zu ip port 4.监控磁盘io iostat -x 1 参考:http://www.php230.com/by-iostat-command-to-monitor-disk-io-performance.html 5.查看网络tcp端口占用 netstat -nltp 6.将服务加入到开机启动 chk…

2013-11-15 19:41 · linux · 评论(0)

如何限制用户访问图片

突然想到一个问题如何防止web用户访问静态资源文件,想了思路 解决方法: 目录采用用户相关属性明明,在nginx编写lua代码对用户的http请求进行验证(结合用户的cookie),限制用户对目录的访问,以上的lua实现也可以用c写nginx的module 验证用户信息时就需要连接后端db,所以当用户量上来以后可能成为系统瓶颈。针对这种问题可以参考ssh协议,写一个nginx模块,去除与后端db的关联

2013-11-13 22:43 · lua · 设计 · 评论(0)

chrome for mac下查看chrome插件源码

1.进入插件管理页面,拿到插件的ID ID: fngmhnnpilhplaeedifhccceomclgfbg 2.进入目录 ~/Library/Application Support/Google/Chrome/Default/Extensions/fngmhnnpilhplaeedifhccceomclgfbg 然后将文件拷贝出来即可

2013-11-13 11:15 · mac · 评论(0)

mac下编译安装nginx

基于max os x 10.9 源码编译安装nginx时需要gcc、make等工具,可以在安装xcode,默认就会安装上这些工具 nginx的http_rewrite模块需要pcre支持,在编译时需要加入pcre。编译步骤 1.下载最新版nginx http://nginx.org/ 2.下载最新版pcre http://www.pcre.org/ 当然是否使用最新版看个人而定 我下载的是nginx-1.4.3和pcre-8.33 解压以后放到同一个文件夹下 编译命令 sudo ./configure --prefix=/usr/local/nginx --with-pcre="../pcr…

2013-11-01 18:44 · mac · 评论(0)

一些好用的nginx第三方模块

1.Development Kit https://github.com/simpl/ngx_devel_kit Nginx的开发工具包 2.Echo http://wiki.nginx.org/HttpEchoModule 便捷命令,输出nginx信息 3.Extended status module http://wiki.nginx.org/Extended_status_module Nginx status模块的扩展 4.Foot filter http://wiki.nginx.org/HttpFootFilterModule 在页面输出底部加入字符串 5.GeoIP http:…

2013-10-23 17:15 · nginx · 评论(0)

redis命令思维导图

简单写了个redis命令的思维导图 这样理解redis常用命令更加清晰,详细的redis命令解释见 http://redis.io/commands

2013-09-25 12:41 · redis · 评论(1)

python 2.7安装

wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2 bunzip2 Python-2.7.5.tar.bz2 tar xvf Python-2.7.5.tar cd Python-2.7.5 ./configure --prefix=/usr/local/python2.7 make make install

2013-09-18 13:59 · python · 评论(0)

shell脚本-自动打通服务器ssh

使用了expect来处理交互内容,代码如下 #!/bin/sh function usage() { cat << EOF Usage ssh_connect ip [username] [password] EOF } auto_login_ssh() { expect -c "set timeout -1; spawn ssh $user@$ip expect { yes/no { send \"yes\n\" expect password send \"$pass\n\" } password {send \"$pass\n\"} } interact; " } scp_file()…

2013-09-18 12:17 · shell · 评论(0)

算法题目(一)

给出一下代码的时间复杂度: int sum = 0; for (int i = 1; i <= 4*N; i = i*4) for (int j = 0; j < i; j++) sum++; 答案是N 内部循环的遍历次数依次是 1+4+16+256+4^(i-1)+...+4n ~= 16/3N 所以答案是N,一般会认为是N^2

2013-09-16 16:58 · 算法 · 评论(0)

python 安装pip

1.介绍 pip 是个 python 第三方模块管理工具,类似easy_install 官网: http://www.pip-installer.org/en/latest/ 基于python2.4版本,2.4不兼容最新版本的pip 2.安装setuptools 下载:wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.1.tar.gz 解压:tar zxvf setuptools*.tar.gz 进入目录运行:python setup.py insta…

2013-09-06 14:03 · python · 评论(0)