-
sencha theme
http://blog.wu-boy.com/2011/11/the-future-of-stylesheets-sass-compass/http://kalug.linux.org.tw/planet/user/24/tag/compass/
2012-05-08
全文链接
Text
-
python 抓取网页 保存文件
#!/usr/bin/env python#-*- coding: utf-8 -*-import osfrom os.path import join, existsimport urllib2def getRequest(url): request = urllib2.Request(url) request.add_header('User-Agent', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)') try: try: response = urllib2.urlopen(request,timeout=20) return response.read() #.decode('gbk','ignore').encode('utf-8') #.replace(u'�','') except Exception,e: print "erorr %s %s" % (url,e) return None except urllib2.HTTPError, e: print e.codedef saveToFile(filepath,filename,content): #with open(join("/data/scrapy/comms/", filename), 'wb') as f: with open(join(filepath,filename), 'wb') as f: f.write(content)if __name__ == '__main__': htmlstr=getRequest('http://www.google.com') saveToFile('/home/hqman','google.html',htmlstr)
2012-04-01
全文链接
Text
-
copy hdjr js
scriptfunction YMD(year, month, date){ MonHead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; for (var i = 1912; i = 2031; i++) document.getElementById("Y").options.add(new Option(i + "Year", i)); //赋年份的下拉框 for (var i = 1; i 13; i++) document.getElementById("M").options.add(new Option(i + "Mon", i)); //赋月份的下拉框 document.getElementById("Y").value = year document.getElementById("M").value = month var n = MonHead[month - 1]; if (month == 2 IsPinYear(year)) n++; writeDay(n); //赋日期下拉框 document.getElementById("D").value = date;}function YC(str)//年发生变化时日期发生变化(主要是判断闰平年){ var Mvalue = document.getElementById("M").options[document.getElementById("M").selectedIndex].value; if (Mvalue == "") { var e = document.getElementById("D"); optionsClear(e); return; } var n = MonHead[Mvalue - 1]; if (Mvalue == 2 IsPinYear(str)) n++; writeDay(n);}function MC(str)//月发生变化时日期联动{ var Yvalue = document.getElementById("Y").options[document.getElementById("Y").selectedIndex].value; if (Yvalue == "") { var e = document.getElementById("D"); optionsClear(e); return; } var n = MonHead[str - 1]; if (str == 2 IsPinYear(Yvalue)) n++; writeDay(n);}function writeDay(n)//据条件写日期的下拉框{ var e = document.getElementById("D"); optionsClear(e); for (var i = 1; i (n + 1); i++) e.options.add(new Option(i + "day", i));}function IsPinYear(year)//判断是否闰平年{ return (0 == year % 4 (year % 100 != 0 || year % 400 == 0));}function optionsClear(e) { e.options.length = 0;}/scriptp align="center"select name="Y" id="Y" onchange="YC(this.value)" /selectselect name="M" id="M" onchange="MC(this.value)"/selectselect name="D" id="D"/selectscriptYMD(2012,3,28);function getDay(){daystr=document.getElementById("Y").value+"-"+document.getElementById("M").value+"-"+document.getElementById("D").value;alert(daystr);//alert(window.location=daystr);return daystr;}/scriptinput type='button' value="search" onclick="getDay();" //p
2012-03-28
全文链接
Text
-
(2006, 'MySQL server has gone away') 错误
应用刚上线几天 db session 老是出错,找到根源 原来是(2006, 'MySQL server has gone away')所导致 session 不可用。mysql 中有2个关于 连接超时的变量interactive_timeout和wait_timeout show variables like '%timeout%'; 结果都是 28800 时间为8个小时意思是8个小时 当中没有connection 会自动让连接失效设置方法:set global wait_timeout=300 ,interactive_timeout=300;sqlalchemy 中连接参数sqlalchemy.pool_recycle = 30pool_recycle 设置 重建连接的 时间间隔http://docs.sqlalchemy.org/en/latest/core/engines.html?highlight=create_engine#sqlalchemy.create_engine
2012-03-20
全文链接
Text
-
scim 输入法设置
在scim输入法中进行了如下设定:scim设置-全局设置-将预编辑字符串嵌入到客户端中 前的勾去掉scim设置-gtk-嵌入式候选词标的勾去掉重启scim打开终端,输入 pkill scim然后输入 scim -d命令:sudo /etc/X11/xinit/xinput.d/scim找到其中的GTK_IM_MODULE=ximQT_IM_MODULE=xim把它们改成GTK_IM_MODULE=scimQT_IM_MODULE=scim
2012-03-15
全文链接
Text
-
supervisor gunicorn 小计
pyramid 真实环境部署1:gunicorn:gunicorn_paster [opts] -D怎么管理gunicorn 进程?方法1: shell#!/bin/bash### BEGIN INIT INFO# Provides: manage process gunicorn_paster# Required-Start: $local_fs $remote_fs $network# Required-Stop: $local_fs $remote_fs $network# Should-Start: $gunicorn_paster# Should-Stop: $gunicorn_paster# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: Start gunicorn_paster.# Description: Start gunicorn_paster.### END INIT INFOBASE_PATH='/home/hqman/projects/pydev'NAME='meside'APP_HOME=$BASE_PATH/$NAMEAPP_BIN=$BASE_PATH/binDAEMON=$APP_BIN/gunicorn_pasterPIDFILE=$APP_HOME/$NAME.pid#need sudo user#if [ `id -u` -ne 0 ]; then# echo "You need root or sudo privileges to run this script"# exit 1#fistart_app() {if [ -e $PIDFILE ]; thenecho "meside is running"return 1ficd $BASE_PATHsource bin/activateecho "start $NAME" start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- -b 127.0.0.1:8000 -D $APP_HOME/development.ini -p $PIDFILE}stop_app() {echo "stop meside"if [ -f $PIDFILE ]; then echo "Killing $NAME" kill $(cat $PIDFILE ) fi}case "$1" instart)start_app;;stop)stop_app;;restart)stop_appsleep 2start_app;;*)echo ' * Usage: gunicornctl {start|stop|restart}'exit 1;;esac这个方法 方便 启动 重启 关闭 gunicorn 进程方法2: 采用supervisor 来管理1:下载 sudo apt-get install supervisor2: 编写配置文件[unix_http_server]file=%(here)s/supervisor.sock ; (the path to the socket file)[supervisord]logfile=%(here)s/supervisord.log ; (main log file;default $CWD/supervisord.log)logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)logfile_backups=10 ; (num of main logfile rotation backups;default 10)loglevel=info ; (log level;default info; others: debug,warn,trace)pidfile=%(here)s/supervisord.pid ; (supervisord pidfile;default supervisord.pid)nodaemon=false ; (start in foreground if true;default false)minfds=1024 ; (min. avail startup file descriptors;default 1024)minprocs=200 ; (min. avail process descriptors;default 200)[rpcinterface:supervisor]supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface[supervisorctl]serverurl=unix://%(here)s/supervisor.sock ; use a unix:// URL for a unix socket[program:meside]command=%(here)s/../../bin/gunicorn_paster --log-file=%(here)s/xxx.log %(here)s/../production.inidirectory=%(here)s/../user=xxxautostart=trueautorestart=trueredirect_stderr=falseenvironment=PATH=%(here)s/../../bin3:启动 supervisor supervisord -c xx.conf4: 通过 supervisorctl restart start stop app参考http://blog.yangyubo.com/2009/05/14/supervisor-introduce/
2012-03-13
全文链接
Text
-
前端学习网址大全
2012-01-16UED大全http://www.baiduux.com/百度UFOhttp://ued.sohu.com/搜狐UEDhttp://ued.taobao.com/淘宝UEDhttp://www.ued163.com/网易UEDhttp://www.uedblog.com/YAHOO!CNUEDhttp://ued.ctrip.com/携程UEDhttp://fed.renren.com/人人网FEDhttp://cdc.tencent.com/腾讯CDChttp://isd.tencent.com/腾讯ISDhttp://www.sndaued.com/盛大UEDhttp://ued.koubei.com/雅虎口碑网UEDhttp://ued.alipay.com/支付宝UEDhttp://www.aliued.cn/阿里巴巴(中文站)UEDhttp://www.aliued.com/阿里巴巴(国际站)UEDhttp://www.alisoftued.com/阿里软件UEDhttp://www.the9ued.com/The9UED腾讯系http://cdc.tencent.com/http://isd.tencent.com/http://wsd.tencent.com/http://flashteam.tencent.com/http://tgideas.qq.com/阿里系http://ued.taobao.com/http://ued.alipay.com/http://www.aliued.com/http://www.aliued.cn/http://ued.alimama.com/http://ued.koubei.com/百度系http://www.baiduux.com/http://mux.baidu.com/网易系http://uedc.163.com/http://www.ued163.com/http://ucd.blog.163.com/其他http://ued.sina.com/http://www.sndaued.com/http://ued.sohu.com/http://ued.iciba.com/http://ued.ctrip.com/http://www.kdued.com/http://ued.5173.com/http://blog.19ued.com/还有一些不错的用户体验团队没有公开的网站,比如:创新工场、Google、Microsoft、Nokia、Motorola等。前端团队阿里巴巴 UED— 我们设计的界面,并没有几十亿的流量,但每天来自上百个国家的百万商人在使用着。阿里巴巴中国站UED— 阿里巴巴中国站UED成立于1999年,全称是用户体验设计部(User Experience Design Department),是阿里巴巴集团最资深的部门之一。支付宝前端开发— 支付宝前端开发车间。淘宝UED— 淘宝网用户体验团队。淘宝MED— MED(Marketing Experience Design). 是淘宝营销体验设计部门,为淘宝网的营销产品做体验设计。口碑UED— UED(User Experience Design) 中文意思就是用户体验设计。百度MUX— MUX(Mobile User Experience) 百度无线用户体验部。百度泛用户体验— 泛用户体验平台,是以’用户体验’为核心的跨专业分享平台。盛大游戏UED— 专注用户体验,改变生活,让互动娱乐更精彩。携程旅游UED— 这是一个血液中流淌着创意和活力的团队,在越来越关注严谨和灵活的过程中成长起来,我们对前端的需求如此强烈腾讯CDC— 全称是Customer Research User Experience Design Center(即用户研究与体验设计中心)作为腾讯的核心部门之一.腾讯ISD— ISD Webteam是一个设计团队,即腾讯互联网业务系统网站组。腾讯ISUX— 腾讯 ISUX 全称腾讯互联网用户体验设计部 (Internet Service User Experience),于2011年3月8日正式成立,前身为 ISD Webteam 网站组。腾讯WSD— 腾讯用户体验设计团队. 设计无线,快乐无限。腾讯Flash Team— 这里有一群可爱的Flash娃,他们热爱ActionScript开发~腾讯soso团队博客— soso更懂你。财付通TID— Tenpay Innovation Design, 财付通设计中心。5173 UED— 5173用户体验设计团队(User Experience Design),简称UED,成立于2009年。19楼UED— 19楼 UED团队。人人FED— 我们来自人人网,FED是”Front End Develop and Design”的缩写。网易邮箱UI团队— 网易邮箱UI团队。网易UED— 我们的团队博客,关注用户体验设计、关注web前端开发。网易UEDC— 网易用户体验设计中心(User Experience Design Center),简称”设计中心(UEDC)”,成立于2008年底。搜狐UED— Sohu UED Team就聚集着这样一群人,执着于为用户提供更好的产品和体验,哪怕是对一点点小细节的精益求精。新浪UED— 一个关注用户体验、关注工作流、关注作品质量的有爱团队。爱词霸UED— 爱词霸用户体验团队博客,有关用户体验设计和研究的经验分享。其它团队淘宝搜索— 淘宝搜索技术blogAlibaba DBA Team— 这里记录着阿里巴巴数据库团队成员的点点滴滴淘宝Data— 淘宝数据平台与产品部,是淘宝核心的数据平台技术和数据产品研发团队淘宝DBA Team— 淘宝数据库技术团队淘宝JAVA中间件团队— 我们是淘宝JAVA中间件团队。我们为淘宝网构建JAVA底层架构和基础服务。Taobao QA Team— 做测试的行业标准淘宝核心系统团队— 淘宝核心系统团队隶属于淘宝产品技术部,负责淘宝应用基础平台的研发和搭建阿里巴巴Data Warehouse— 阿里巴巴数据仓库部门主要收集公司内外部所有数据腾讯TGideas— TGideas是腾讯游戏的专业设计团队腾讯GDC— GDC的前身叫GDT(QQGAME DESIGN TEAM),QQ游戏产品设计中心个人博客Kejun— 就职于豆瓣Donkey(倔倔)— 就职于豆瓣蒙晨(波希米亚)— 就职于豆瓣greengnn(老卡)— 就职于豆瓣糖伴西红柿— 就职于豆瓣Fenng— 曾就职于支付宝sofish— 就职于支付宝白鸦— 就职于支付宝62mm— 就职于支付宝伯约(老鱼)— 就职于支付宝怿飞(圆心,Blank)— 就职于淘宝玉伯(lifesinger)— 就职于淘宝明城(mingcheng)— 就职于淘宝Der(崇志)— 就职于淘宝黑妞HAHA— 就职于淘宝秦歌(Kaven)— 就职于口碑网Emu(Stone)— 就职于腾讯Ghost— 就职于腾讯Yuguo— 就职于腾讯臭鱼— 曾就职于腾讯艾文王— 就职于腾讯Danger— 就职于腾讯神飞— 就职于腾讯pufen(飘飘)— 就职于腾讯屈超— 就职于腾讯米随随— 就职于腾讯大猫— 就职于腾讯AVENIR(郑焕义)— 就职于腾讯李振文— 就职于腾讯OnLing— 就职于腾讯Xiaoxiao— 就职于腾讯Seven— 就职于腾讯Lerroy— 就职于腾讯愚人码头— 就职于搜道网子鼠,秀才— 就职于百姓网Adam Lu— 就职于新浪林小志— 就职于携程旅游小灰灰— 就职于携程旅游小JOE— 就职于腾讯彬Go— 就职于人人Rokey— 曾就职于微软,网易,金山软件Evance(布拉格)— 就职于阿里巴巴日本深空— 就职于腾讯代码人(tomie)— 就职于腾讯小爝(龙啸)— 就职于淘宝Aether— 就职于土豆网一葉千鳥— 曾就职于盛大7月— 就职于Adobe周裕波— 就职于盛大创新院崔凯— 就职于傲游勾三股四— 就职于傲游welefen— 就职于百度kent.zhu— 就职于百度aoao(嗷嗷)— 就职于百度JerryQu— 就职于百度胡晓— 就职于网易5key— 就职于阿里巴巴Adam— 就职于Yahooslj(申力军)— 就职于赶集
2
2012-03-09
全文链接
Text
-
js 常用正则
只能输入数字:"^[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位小数的正实数:"^[0-9]+(.[0-9]{1,3})?$"。只能输入非零的正整数:"^\+?[1-9][0-9]*$"。只能输入非零的负整数:"^\-[1-9][]0-9"*$。只能输入长度为3的字符:"^.{3}$"。只能输入由26个英文字母组成的字符串:"^[A-Za-z]+$"。只能输入由26个大写英文字母组成的字符串:"^[A-Z]+$"。只能输入由26个小写英文字母组成的字符串:"^[a-z]+$"。只能输入由数字和26个英文字母组成的字符串:"^[A-Za-z0-9]+$"。只能输入由数字、26个英文字母或者下划线组成的字符串:"^\w+$"。验证用户密码:"^[a-zA-Z]\w{5,17}$"正确格式为:以字母开头,长度在6~18之间,只能包含字符、数字和下划线。验证是否含有^%',;=?$\"等字符:"[^%',;=?$\x22]+"。只能输入汉字:"^[\一-\龥]{0,}$"
1
2012-03-06
全文链接
Text
-
关于时间和时区
关于时间在计算机中的表达方式1:Unix 时间戳 1970年1月1号 凌晨开始 以后的秒数偏移量 来表示 时间2:GMT十七世纪,格林威治皇家天文台为了海上霸权的扩张计画而进行天体观测,这里所设定的时间是世界时间参考点,全球都以格林威治的时间作为标准来设定时间,这就是我们耳熟能详的「格林威治标准时间」(Greenwich Mean Time,简称G.M.T.)的由来。3:UTC 称为通用协调时(UTC, Universal Time Coordinated)。 以GMT 国际原子钟来计时更为精准。4:时区每个地方都有本地时间 早上八点起床 晚上12点睡觉。我们的本地时间 UTC+8 领先于 基准8个小时 在东八区。 以格林威治的子午线作为划分地球东西两半球的经度零度。每隔经度15°,时差1小时。5:MYSQL 中的timestamp 是一个UTC时间 因此显示本地化时间 需要通过时区转换时间范围1970-2037.
2012-02-28
全文链接
Text
-
SWFUpload 多文件上传利器
SWFUpload V2.2.0 说明文档http://leeon.me/upload/other/swfupload.html
2012-02-16
全文链接
Text
-
linux 下防止 rm -rf 重要文件的工具safe-rm
https://launchpad.net/safe-rm1,安装apt-get install safe-rm2,这时系统的一些重要目录就不会被删除$ rm -rf /usrSkipping /usr3,通过配置/etc/safe-rm.conf或~/.safe-rm添加你的需要保护的路径或文件
2012-02-16
全文链接
Text
-
14步优化网站的方法
14 steps to first-load web sitesRule 1, Make fewer HTTP request将多个请求js,css等的链接组装成一个 (Nginx concat)利用CSS对对较大图片做 sprites,减少请求图片的http请求数Rule 2, Use a CDN不多说,这是常识了Rule 3, Add an Expire Headerjs,css,img等元素都可以添加http缓存根据情况选择是采用conditional get,还是Expire/Cache-ControlHTTP specification dictates that the max-age directive will override the Expires headerRule 4, Gzip Compressed减少数据传输的大小,减少传输时间注意不要对image压缩,因为这样做只会浪费cpu时间Rule 5, Put CSS at the Top利用浏览器渐近渲染(Progressiverendering)的特性,因为浏览器需要css全部下载后,才会开始渲染,所以把css放在顶部,让它优先被下载Rule 6, Put Scripts at the BottomJavaScript的下载会block 浏览器的并行下载功能JavaScript 同时会block浏览器的渐近式渲染(Progressiverendering) 所以要把javascript放在底部。Rule 7, Avoid CSS ExpressionRule 8, Make JavaScript and CSS External便于js css文件的管理,包括前端与后端同学的分工及并行开发便于对javascript 做Minify及前面所说的concat组装Rule 9, Reduce DNS Lookup某些时候DNS会占用很大时间,所以需要尽量利用DNS Cache减少页面上使用到的域名的个数利用HTTP的Keep-Alive特性,减少后续请求的DNS Lookup.Rule 10, Minify JavaScript减少js文件的大小,同理可以作用在html文件中利用JSMin或 Dojo Compressor进行MinifyRule 11, Avoid Redirects尽量避免重定向,用户体验杀手Rule 12, Remove Duplicate Scripts不多说啥,这也应该是写代码人员的常识。Rule 13, Configure or remove ETags许多的http server在E-Tag生成唯一的key时,默认会使用一些主机上的信息,需要做到统一。建议使用Last-ModifiedRule 14, Make Ajax Cacheable对Ajax请求的数据做缓存利用第3条的http expire机制,对Ajax请求做处理
2012-02-12
全文链接
Text
-
网站图片存储的一点思考
用户logo 图片存储是一个看起来很容易的问题/user/log/{{id}}.jpg或者 直接把 dir path 存入 user logo 字段但实际中有一些 头痛的问题1:默认头像 第一种方案 不能实现这个功能 2:图片cache 更新后不能及时更新第一种方案查阅一些 大的网站发现一个有趣的作法数据库中保存一个 图片的 version 每次更新 +1可以完美解决以上2个实际中点问题
2012-02-10
全文链接
Text
-
pyramid 注意事项1
pyramid 资源文件 src 路径 一定要 用{{request.static_url(test:static/css/tipTip.css')}} 这样的写法
2012-02-08
全文链接
Text
-
pyramid 杂记1
1:sql 优化 sqlalchemy orm 查询 一个表 会select 所有字段sqlalchemy.sql.select 方法可以 实现按照需要 提取expr=select([cls.id,cls.name],cls.user_id==userId)dbSession.execute(expr).fetchall()2:pyramid app 根目录 文件 serve 方式http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/files.html#serving-a-single-file-from-the-root
2012-02-08
全文链接
Text
-
关于 json 序列化 反序列化
关于 json 序列化 反序列化http://www.doughellmann.com/PyMOTW/json/
2012-02-06
全文链接
Text
-
2012-02-04
全文链接
Photo
-
PIL报错IOError at decoder jpeg not available
1:sudo apt-get install libjpeg-dev libpng-dev zlib1g-dev liblcms1-dev python-dev2:pip install -U PIL参考http://ygamretuta.me/2011/05/27/install-pil-in-ubuntu-natty-python27-virtualen/http://ubuntuforums.org/showthread.php?t=1751455
2012-01-30
全文链接
Text
-
ubuntu上使用osx字体
1 : scp mac font to ubunt pc (output from 字体册)2:sudo cp -rvf macfonts /usr/share/fonts/apple3: cd/usr/share/fonts/apple4:sudomkfontscale; mkfontdir fc-cache -f -v
2012-01-29
全文链接
Text
-
ubuntu下个人工具集
pptp vpn gnome-dodockygedit-gmate
2012-01-29
全文链接
Text
-
python 项目 .gitignore
cat .gitignore*.swp*.swo*.mo*.egg-info*.egg*.EGG*.EGG-INFObinbuilddevelop-eggsdownloadseggsfake-eggspartsdist.installed.cfg.mr.developer.cfg.hg.bzr.svn*.pyc*.pyo*.pyd*.so*.tmp**..DS_Store
2012-01-26
全文链接
Text
-
ubuntu下mysql innodb设置
ubuntu默认安装 mysql 默认引擎不是 innodb设置default-storage-engine=INNODBinnodb_data_home_dir = /var/lib/mysql/innodb_data_file_path = ibdata1:1024M:autoextend (表空间 自动增长)重新 mysql 出错在ubuntu 官方 找到处理办法https://bugs.launchpad.net/ubuntu/+source/mysql-5.1/+bug/7926071: 备份 所有的数据sudo mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --all-databases all_tables.sql2:删除 以前的 innodb 日志 表数据sudo service mysql stoprm /var/lib/mysql/ibdata /var/lib/mysql/ib_logfile*sudo service mysql start启动过程会 重建 innodb 表数据3:启动 导入数据
2012-01-25
全文链接
Text
-
国内类pin网站不完全列表
花瓣网:huaban.com(厚积薄发的冲击者,让竞争变得再激烈一些吧!)堆糖网:duitang.com(如果要娶女人,就要娶堆糖这样的女人!)嘀咕网:digu.com(没错,你没看错,就是你用过的那个嘀咕……)拼范:pinfun.comMark之:markzhi.com迷尚:mishang.com码图网:markpic.com知美:zhimei.com拼图图:pintutu.com微图:at.im积木:jimuu.com
1
2012-01-19
全文链接
Text
-
jQuery-plugins 收集
jquery.timeagohttp://timeago.yarp.com/https://gist.github.com/6251jquery.blockui http://www.malsup.com/jquery/block/#demos jquery.infinitescroll.js https://github.com/paulirish/infinite-scrollhttp://www.appelsiini.net/projects/jeditableeditblehttp://www.wookmark.com/jquery-pluginhttps://github.com/desandro/masonry/http://infinite-scroll.com/http://www.dynamicdrive.com/dynamicindex3/scrolltop.htmuptotophttp://arshaw.com/fullcalendar/docs/ 日历插件http://deepliquid.com/content/Jcrop.html图片裁剪
2012-01-18
全文链接
Text
-
lighttp 配置
server.modules = ( "mod_access", "mod_alias", "mod_accesslog", "mod_compress", "mod_rewrite", "mod_redirect",# "mod_evhost",# "mod_usertrack",# "mod_rrdtool",# "mod_webdav",# "mod_expire",# "mod_flv_streaming",# "mod_evasive" "mod_proxy",)mimetype.assign = ( #".pdf" = "application/pdf", ".sig" = "application/pgp-signature", ".spl" = "application/futuresplash", ".class" = "application/octet-stream", ".ps" = "application/postscript", ".torrent" = "application/x-bittorrent", ".dvi" = "application/x-dvi", ".gz" = "application/x-gzip", ".pac" = "application/x-ns-proxy-autoconfig", ".swf" = "application/x-shockwave-flash", ".tar.gz" = "application/x-tgz", ".tgz" = "application/x-tgz", ".tar" = "application/x-tar", ".zip" = "application/zip", ".mp3" = "audio/mpeg", ".m3u" = "audio/x-mpegurl", ".wma" = "audio/x-ms-wma", ".wax" = "audio/x-ms-wax", ".ogg" = "application/ogg", ".wav" = "audio/x-wav", ".gif" = "image/gif", ".jpg" = "image/jpeg", ".jpeg" = "image/jpeg", ".png" = "image/png", ".xbm" = "image/x-xbitmap", ".xpm" = "image/x-xpixmap", ".xwd" = "image/x-xwindowdump", ".css" = "text/css", ".html" = "text/html", ".htm" = "text/html", ".js" = "text/javascript", ".asc" = "text/plain", ".c" = "text/plain", ".cpp" = "text/plain", ".log" = "text/plain", ".conf" = "text/plain", ".text" = "text/plain", ".txt" = "text/plain", ".dtd" = "text/xml", ".xml" = "text/xml", ".mpeg" = "video/mpeg", ".mpg" = "video/mpeg", ".mov" = "video/quicktime", ".qt" = "video/quicktime", ".avi" = "video/x-msvideo", ".asf" = "video/x-ms-asf", ".asx" = "video/x-ms-asf", ".wmv" = "video/x-ms-wmv", ".bz2" = "application/x-bzip", ".tbz" = "application/x-bzip-compressed-tar", ".tar.bz2" = "application/x-bzip-compressed-tar")server.document-root = "/var/www"server.upload-dirs = ( "/var/cache/lighttpd/uploads" )server.errorlog = "/var/log/lighttpd/error.log"server.pid-file = "/var/run/lighttpd.pid"server.username = "www-data"server.groupname = "www-data"index-file.names = ( "index.php", "index.html", "index.htm", "default.htm", " index.lighttpd.html" )url.access-deny = ( "~", ".inc" )static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )## Use ipv6 if available#include_shell "/usr/share/lighttpd/use-ipv6.pl"dir-listing.encoding = "utf-8"server.dir-listing = "enable"compress.cache-dir = "/var/cache/lighttpd/compress/"compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )#include_shell "/usr/share/lighttpd/create-mime.assign.pl"#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"server.modules += ( "mod_fastcgi" )fastcgi.server += ( ".php" = (( "bin-path" = "/usr/bin/php-cgi", "socket" = "/tmp/php.socket", "max-procs" = 1, "bin-environment" = ( "PHP_FCGI_CHILDREN" = "4", "PHP_FCGI_MAX_REQUESTS" = "10000" ), "bin-copy-environment" = ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" = "enable" )))$HTTP["host"] =~ "mydb.com"{server.document-root="/usr/share/phpmyadmin"}
2012-01-13
全文链接
Text
-
py 环境 搭建
1:sudo apt-get install python-2.7-devlibmysqlclient15-dev2 :sudo apt-get install python-pip python-virtualenv3:virtualenv --no-site-packages pydev4:pip installPIL py-bcryptMySQL-python
2012-01-13
全文链接
Text
-
synergy 鼠标键盘共享配置
1:配置文件/etc/synergy.confsection: screens ehome: jagon:endsection: links jagon: right = ehome ehome: left = jagonend2:服务端启动synergys -c /etc/synergy.conf -n ehome3:客户端 启动synergyc -n jagon 192.168.1.4 (服务端IP)
2012-01-13
全文链接
Text
-
aria2 下载工具使用
aria2c -s 5 http://releases.ubuntu.com/natty/ubuntu-11.04-desktop-i386.iso5个线程 下载aria2c -chttp://releases.ubuntu.com/natty/ubuntu-11.04-desktop-i386.iso断点续传
2012-01-12
全文链接
Text
-
安装 mysqldb 出错
installsh: line 1: mysql_config: command not foundTraceback (most recent call last):File "setup.py", line 16, in ?metadata, options = get_config()File "/Users/farocco/MySQL-python-1.2.2/setup_posix.py", line 43, inget_configlibs = mysql_config("libs_r")File "/Users/farocco/MySQL-python-1.2.2/setup_posix.py", line 24, inmysql_configraise EnvironmentError, "%s not found" % mysql_config.pathEnvironmentError: mysql_config not found解法 :安装libmysqlclient15-dev
2012-01-09
全文链接
Text
-
jquery 密码强度检查 插件
jquery 密码强度检查 插件http://mypocket-technologies.com/jquery/password_strength/
2012-01-05
全文链接
Text