godblessyuan.com
debian7.5编译安装apache2.4+php5.6
http://www.godblessyuan.com/2015/08/06/debian7-5compile_install_apache2-4_php5-6
Debian7.5编译安装apache2.4 php5.6 – 神一样的少年. Debian7.5编译安装apache2.4 php5.6. 纪念一下debian 7.5 编译安装apache2.4 php 5.6 仅编译,不配置. Tar -zxpf zlib-1.2.8.tar.gz cd zlib-1.2.8 ./configure - prefix=${SOFT DIR};make -j2 & make install. Tar -zxpf apr-1.5.2 change.tar.gz cd apr-1.5.2 ./configure - prefix=${SOFT DIR}/apr;make -j2 & make install. Tar -zxpf libiconv-1.14.tar.gz cd libiconv-1.14 ./configure - prefix=${SOFT DIR} ;make & make install. Tar -zxpf curl-7.43.0.tar.gz cd curl-7.43.0 ./config...Tar -zxpf freetype-2....
godblessyuan.com
2015 七月
http://www.godblessyuan.com/2015/07
2015年7月 – 神一样的少年. Head first python 第八章 web交互 学习笔记. Head first css html. Head first css html.
godblessyuan.com
nagios 理解(1)
http://www.godblessyuan.com/2015/07/13/nagios_understand_1
Nagios 理解 1 – 神一样的少年. 1nsca 2.nrpe 3.主动监控和被动监控 4.NDOUtils 5.plugins 6.addons. NSCA is an addon that allows you to send passive check results from remote Linux/Unix hosts to the Nagios daemon running on the monitoring server. This is very useful in distributed and daredunnt/failover monitoring setups. Http:/ nagios.sourceforge.net/docs/nagioscore/4/en/addons.html#nsca. Http:/ nagios.sourceforge.net/docs/nagioscore/4/en/passivechecks.html. Plugins are compiled executables or scripts (Perl scripts, shell sc...
godblessyuan.com
关于laravel5.1安装心得
http://www.godblessyuan.com/2015/07/20/laravel5-1_install_tutorial
关于laravel5.1安装心得 – 神一样的少年. 看了laravel中文网的文档翻译,感觉是好一点了,不过因为直接翻译,所以本来差翻译也是差,不是翻译的问题,是源的问题 ,在接着看了2天的入门文档,要么也是跟作者一样,好像很牛逼的样子,然后就是看不懂啊,最直接的效果就是,卧槽,这怎么可以突然变成这样了 过程呢 ,还有一些因为太老了,版本已落后,安装方式配置方法都有变化了,所以不能用,所以自己就将摸索的经验放出来,我也是刚接触,只接触到安装和简单实用,router,midd,control,bladetemple,还没有深入,毕竟我也是刚学php,过程很辛酸,靠着以前的linux 知识,django框架知识,html和css的基础知识终于是入门laravel了。 Ubuntu 14.2 64位 开发使用,主要因为php的包版本够高,满足laravel的要求. 由于laravel是试用composer来做包依赖管理的,包括laravel的安装,所以还需要安装composer https:/ getcomposer.org/. 建议 /profile : 在登录时用到的第三个文件 是.profil...
godblessyuan.com
head first python(第五章)–学习笔记
http://www.godblessyuan.com/2015/04/27/head_first_python_chapter_5_learning
Head first python 第五章 –学习笔记 – 神一样的少年. Head first python 第五章 –学习笔记. 原地排序 in-place sorting ,按指定的顺序排列数据,然后用排序后的数据替换原来的数据。 复制排序 copied sorting ,按你指定的顺序排序,然后返回原数据的一个有序副本。 Datastrip().split(‘,’). 创建一个函数,传入时间参数,然后将不一致的 -, 数据清除掉,然后将其分割为分和秒,然后整合在一起,形成统一时间格式 MM:SS。 Def sanitize(time string): if '-' in time string: splitter = '-' elif ':' in time string: splitter = ':' else: return(time string) (mins, secs) = time string.split(splitter) return(mins '.' secs). 协议进行授权,转载请注明转自 head first python 第五章 –学习笔记.
godblessyuan.com
head first python(第四章)–学习笔记
http://www.godblessyuan.com/2015/04/26/head_first_python_chapter_4_learning
Head first python 第四章 学习笔记 – 神一样的少年. Head first python 第四章 学习笔记. Print (man) print (other). Print (“Norwegian Blues XXXX”,file=out) 是python 3.0用法,如果旧版本的python就是用. Usr/bin/python # -*- coding: utf-8 -*- man = [] other = [] try: data = open('sketch.txt') for each line in data: try: (role,line spoken) = each line.split(':',1) line spoken = line spoken.strip() #这里的解读是 这里不是直接处理line spoken字符串,python 不会改变字符串,他会创建一个新的字符串出来然后执行类似如strip 的方法,然后将返回值赋值到原来的字符串 if role = 'Man': man.append(line spoken) e...Str(err) # 捕获...
godblessyuan.com
做一个小爬虫监控
http://www.godblessyuan.com/2015/06/26/webcrawler_monitor
做一个小爬虫监控 – 神一样的少年. 1机器在线数据显示在网站网页上,每次都要访问这个访问进行查询机器是否在线 2.由于网页上已经有现成的在线数据,所以就不打算直接查询数据库进行数据获取 3.需要定时发送一个邮件通知运维人员在线情况。 GET 方法请注意,查询字符串 名称/值对 是在 GET 请求的 URL 中发送的 /test/demo form.asp? Http:/ www.w3school.com.cn/tags/html ref httpmethods.asp. Url = 'http:/ XXXX/device.php' #url信息 req = urllib2.Request(url=url,data=params)#创建请求内容,参数是url和data a = urllib2.urlopen(req)#进行访问页面,带着请求信息 b = a.read() #这写得比较简单,将访问页面的返回信息转变为json格式,然后读取json格式的内容获取需要的字段,因为我需要的数据在data字段里面,所以直接获取data为key的value信息。 C = json.loads(b) data...
godblessyuan.com
head first python(第六章)–学习笔记
http://www.godblessyuan.com/2015/05/03/head_first_python_chapter_6_learning
Head first python 第六章 –学习笔记 – 神一样的少年. Head first python 第六章 –学习笔记. Sarah Sweeney,2002-6-17,2:58,2.58,2:39,2-25,2-55,2:54,2.18,2:55,2:55,2:22,2-21,2.22. Key - value Name "sarah sweeney" DOB "2002-6-17" Times "[2:58,2.58,2:39,2-25,2-55,2:54,2.18,2:55,2:55,2:22,2-21,2.22]". Cleese = {} #大括号. Cleese['Name'] = 'John Cleese' # 一个key 对应一个字符串. Cleese['Name'] = ['John Cleese','John Cleese1','John Cleese2','John Cleese3','John Cleese4'] #一个key对应一个list. Cleese = {'Name':'abc','Address':'asdasdasda'} #注意是用冒号. Usr/bi...
godblessyuan.com
2015 八月 06
http://www.godblessyuan.com/2015/08/06
2015-08-06 – 神一样的少年. Debian7.5编译安装apache2.4 php5.6. Head first css html. Head first css html.
godblessyuan.com
head first python(第七章web开发)学习笔记
http://www.godblessyuan.com/2015/05/15/head_first_python_chapter_7_learning
Head first python 第七章web开发 学习笔记 – 神一样的少年. Head first python 第七章web开发 学习笔记. 创建generate timing data.py,完成整个测试。 用户浏览器输入url地址 - web浏览器将用户的动作转换为一个web请求,通过互联网发送到url地址的服务器 - 处理请求 1.静态内容 服务器会找到这个资源,并作为一个web响应返回给浏览器 2.动态内容 服务器需要运行一个程序来生成动态内容 这就是所谓的CGI common gateway interface网关接口 - 处理完成,通过互联网返回给用户浏览器,在用户浏览器展示的web应用页面. 简单的说, MVC 是一种软件开发的方法,它把代码的定义和数据访问的方法 模型 与请求逻辑 控制器 还有用户接口 视图 分开来。 Headfirst这里使用一个他们自己写的yate模板引擎,这个模板引擎是from string import Template 使用template库做的。 Cat generate list.py. Usr/bin/python # -*- coding: ut...