ITeye博客

2011 年文章归档

共 11 篇文章

ssh-keygen 免密码登录

每次买VPS,初始化同样的操作系统,在安装LNMP环境时,却不能保证一次通过!不少同学搞了一键安装包,可能我人品不高,每次编译都不顺利。在与系统工程师沟通之后,我决定放弃一键安装的思路。 电影《阿甘正传》有句关于巧克力的台词,与此相同。 记录一下,ssh-keygen凭证书登录的方法,供以后查询: 步驟如下: ssh-keygen -t rsa 或 ssh-keygen -d (dsa) => 產生出 id_rsa, id_rsa.pub scp id_rsa.pub server_hostname:~/.ssh/ ssh server_hostname cat .ssh/id_rsa.pu…

2011-12-27 14:33 · linux

HTML语义

我一直在喊“语义”,非常反感table+css,更反对div+css。最为推崇的是google网站管理员帮助文档,今天在淘宝Alice看到推荐的html语义小文,《 这样去写你的 HTML 》,有空常来看看~

2011-12-27 09:16

mdb2sqlite

微软access数据库貌似没有导出通用sql文件的功能,我也只能从mdb转换到sqlite想办法了。google到一篇文章,《 How to convert MDB files to SQLite 》说是在linux按照mdbtools,辅以shell,就可以搞定了。在编译之前,我的vps安装失败,根据提醒,得先安装“ unixODBC ”。 经过折腾,成功转换成sqlite数据库。

2011-12-22 15:56 · linux

CURLOPT_GET报错

使用curl抓取网页或图片很多次了,今天在php的“E_ALL | E_STRICT”模式下,shell下会有报错: google搜索“+Notice: Use of undefined constant CURLOPT_GET - assumed 'CURLOPT_GET' in”,找到一篇文章《 PHP CURLOPT_GET Does not Exist! 》,原来,CURLOPT_GET本就不存在。 curl_setopt($ch, CURLOPT_GET, true); 注释掉改行即可。

2011-09-11 10:41 · php

来自google的seo建议摘录

1.建议您在网址中使用标点符号。 网址 http://www.example.com/green-dress.html 比网址 http://www.example.com/greendress.html 对我们帮助大得多。 我们建议您在网址中使用连字符 (-) 而尽量避免使用下划线 (_)。 参考地址: http://www.google.com/support/webmasters/bin/answer.py?hl=zh-Hans&answer=76329 2.除"verify"(验证)外,在元标记中,大小写通常无关紧要。 参考网址: http://www.google.com/supp…

2011-09-04 13:43 · html

windows 版本的memcache

在本地windows下开发,集成环境中用到了memcache,导致代码无法正常运行,因此不得不写额外的“开关memcache”的逻辑。 先收藏: http://splinedancer.com/memcached-win32/ The win32 version of memcached can be run both as a NT Service or from the command line. To install memcached as a service, follow the next steps: Unzip the binaries in your desired dir…

2011-08-30 09:45 · linux · 其他

启用右键功能的chrome插件

经常碰到一些屏蔽右键功能的网页,无法查看网页源代码、点出右键菜单。我简单写了个chrome插件,代码不多: var targetEvents = ['oncontextmenu', 'onmousedown', 'ondragstart', 'onselectstart', 'onselect', 'oncopy', 'onbeforecopy', 'onbeforecopy', 'onmouseup']; $.each(targetEvents, function(index, value) { $('body').removeAttr(value); document[value] = …

2011-08-14 08:26 · javascript

windows下PHP安装imagick扩展

别的不多说,网上有很多文章。只是运行不成功的也有很多,备注两点: 一个是win7下,下载完php_imagick.dll,拷贝到ext目录下时,注意右键点击属性,安全下的“解除锁定”要点击一下。 另一个是版本问题,按照 http://valokuva.org/?page_id=50&cpage=8#comment-22560 说的,“Apache, PHP and Imagemagick all have to be built with the same Visual Studio version on Windows”,因此我们必须去找一个用VC9编译的imagemagick,就是“ I…

2011-07-29 21:26 · php

Nginx下的CI虚拟主机配置

参考文章: http://www.trailroom.com/?p=37

2011-04-10 15:49 · php

iptables禁止ip

屏蔽单个IP: iptables -I INPUT -s 124.115.0.199 -j DROP 设置完成,保存重启服务: /etc/rc.d/init.d/iptables save service iptables restart 参考文章: http://codante.org/linux-iptables-ip-blockade

2011-02-13 21:20 · linux

javascript优秀博客

《 使用面向对象的技术创建高级 Web 应用程序 》 《 理解Javascript 》 《 陈成的博客 》 《 岁月如歌 》

2011-01-18 08:55 · javascript