ITeye博客

hyl198611的博客

hyl198611 · 共 72 篇文章

centos 6.7 安装软件

设置固定ip http://jingyan.baidu.com/article/455a99508be7cda167277865.html centos6.7 nginx 1.8.0 1. nginx 安装 添加 nginx操作用户 useradd www 参见 http://blog.csdn.net/yuanchao99/article/details/46357173 手动安装 GEOip http://www.vpsee.com/2011/03/install-nginx-with-geoip-module-for-country-targeting/ ./configure: er…

2016-11-03 11:53 · linux 安装文件 · 评论(0)

centos6.4 nginx 1.8.0 安装教程

. nginx 安装 参见 http://blog.csdn.net/yuanchao99/article/details/46357173 手动安装 GEOip http://www.vpsee.com/2011/03/install-nginx-with-geoip-module-for-country-targeting/ yum install zlib-devel.x86_64 # wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz # tar -zxvf GeoIP.tar.gz # cd GeoIP…

2016-06-07 14:11 · linux 安装文件 · 评论(0)

centos 6.5 detecting hardware

安装 centos6.5 出现 detecting hardware 卡在这个命令不执行 网上都是 acpi=off 这个设置 完全不行,需要用 nomodeset 这个命令来解决!

2016-01-21 19:18 · linux · 评论(0)

linux 下 使用 iptable 和 nginx 封IP

iptables 下 vim /etc/sysconfig/iptables 在最后一行前加入就是COMMIT 上面加入如下语句 -A INPUT -s xxx.xxx.xxx.xxx -p tcp -j DROP /etc/init.d/iptables restart nginx 下 转载:http://blog.csdn.net/qq435792305/article/details/10498999

2015-04-15 15:35 · linux · 评论(0)

Mac OS X下绑定80端口

Mac OS X 因为要绑定80端口需要ROOT权限, 但是如果用root权限启动eclipse或tomcat又会造成, 启动创建的各类文件是root的,普通用户无法删除。 为此, 我们可以通过pfctl做网络层的端口转发, 让连接到本机80端口的请求, 都转发到9090端口; (注意, Mac OS 会使用80端口做网络文件共享, 要先关闭掉) 修改/etc/pf.conf, 使用sudo vim /etc/pf.conf pf.conf是对顺序强要求的, 所以注意添加的内容放的顺序 rdr-anchor "com.apple/*" rdr on lo0 inet proto tcp fr…

2015-01-15 16:56 · mac · 评论(0)

facebook develop

facebook develop key hash: mac的控制台下输入: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore |openssl sha1 -binary | openssl base64 注意: 1.确保你的电脑安装了keytool 和openssl。 2.确保你的alias是正确的,因为即使错误,也不会报错。 3.debug.keystore默认生成在你的用户文件夹里 以下是从facebook官网上拷贝下来的 We now need to do is a expor…

2014-12-29 16:30 · Facebook · 评论(0)

mysql find_in_set

find_in_set(str1,str2) 函数:返回str2中str1所在的位置索引,其中str2必须以","分割开。 表: mysql> select * from region; +----+-------------+ | id | name | +----+-------------+ | 1 | name1,nam2 | | 2 | name1 | | 3 | name3 | | 4 | name2,name4 | | 5 | name3,name5 | +----+-------------+ 5 rows in set (0.00 sec) FIND_IN_SET语句 my…

2014-12-08 16:33 · mysql · 评论(0)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 46: ordinal

pip install manager 报编码错误 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 46: ordinal not in range(128) 解决方式如下: [root@localhost tools]# echo $LANG en_US.UTF-8 可以看出系统默认语言为en_US.UTF-8 对于Python设定语言可以在site-packages中创建sitecustomize.py,Python会自动加载 [root@localhost site-packages]# pwd …

2014-11-26 12:05 · python · 评论(0)

mac pip install lxml

报错如下: cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -Wno-error=unused-command-line-argument-hard-erro…

2014-11-26 11:10 · python · 评论(0)

10种排序算法总结

排序算法有很多,所以在特定情景中使用哪一种算法很重要。为了选择合适的算法,可以按照建议的顺序考虑以下标准: (1)执行时间 (2)存储空间 (3) 编程 工作 对于数据量较小的情形,(1)(2)差别不大,主要考虑(3);而对于数据量大的,(1)为首要。 主要排序法有: 一、冒泡(Bubble)排序——相邻交换 二、选择排序——每次最小/大排在相应的位置 三、插入排序——将下一个插入已排好的序列中 四、壳(Shell)排序——缩小增量 五、归并排序 六、快速排序 七、堆排序 八、拓扑排序 九、锦标赛排序 十、基数排序 一、冒泡(Bubble)排序 -----------------------…

2014-11-04 15:02 · 算法 · 评论(0)

nginx 过滤 ip 访问

location ^~ /XXXX/XXXXX/ { allow XXX.XX.XXX.0/24; allow XXX.XXX.XXX.0/16; deny all; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_connect_timeout 15s; proxy_read_timeout 15s; proxy_pass http://tw.rennpay.com; proxy_set_header X-Real-IP $remote_addr; pro…

2014-09-22 18:28 · nginx 拦截ip 访问接口 · 评论(0)

Linux 非常有用的 20 个命令

也许你已经发现第一篇文章非常的有用,这篇文章是继《 对初级Linux用户非常有用的20个命令 》的一个延伸。 第一篇文章的目的是为新手准备,而这篇文章则是为了Linux的中高级用户。在这里你将学会如何进行自定义搜索,知道正在进行的进程和停掉进程,如何使用Linux的强势功能和如何在系统内编译C、C++和JAVA程序。 21. 命令: Find 搜索指定目录下的文件,从开始于父目录,然后搜索子目录。 1 2 3 4 5 6 7 8 9 10 11 root@tecmint:~# find -name *.sh ./Desktop/load.sh ./Desktop/test.sh ./Desk…

2014-09-12 10:36 · linux · 评论(0)

中国国家气象局天气预报信息接口

想在自己的android应用中获得当天的天气情况,这该怎么做呢?不用担心。中国国家气象局提供了获取所在城市天气预报信息接口。通过这个接口,我们就可以获取天气信息了。 中国国家气象局天气预报接口总共提供了三个: http://www.weather.com.cn/data/sk/101010100.html http://www.weather.com.cn/data/cityinfo/101010100.html http://m.weather.com.cn/data/101010100.html 注:上面接口2014.3.4日已不再更新。换成这个:http://m.weather.com…

2014-08-08 09:33 · api外部接口 · 评论(1)

tcpflow

tcpflow -c -i eth1 dst port 80 netstat -nlp

2014-07-01 20:07 · tcpflow 使用 · 评论(0)

各种接口

这里为大家搜集了一些能够返回JSON格式的服务接口。部分需要用JSONP调用。 电商接口 京东获取单个商品价格接口: http://p.3.cn/prices/mgets?skuIds=J_商品ID&type=1 用例 ps:商品ID这么获取:http://item.jd.com/954086.html 物流接口 快递接口: http://www.kuaidi100.com/query?type=快递公司代号&postid=快递单号 ps:快递公司编码:申通="shentong" EMS="ems" 顺丰="shunfeng" 圆通="yuantong" 中通="zhongtong" 韵达=…

2014-06-30 17:47 · 评论(0)