我行依我素 | 苦苦咸咸就是我 | Snailium的个人网站
今天闲来无聊,上 Google 搜了一下自己的名字,竟然有 5030 条。翻了 10 页,只找到一个关于 snailium 的,而且还是别人的转载。
这么多跟我重名的,竟然一半以上都是女的,89年的。还有一个很有名的貌似是沈阳新东方的老师。
郁闷。看来我只是大海中的一粒沙(不要提醒我,我知道我说错了)。
不过有一点值得欣慰的是,前十页里面没有一条是通缉令(什么思想 = =)。
我还是改搜 snailium 吧……
P.S.倒是搜我弟弟名字的时候,在第 10 页看到他本人了。果然我已经算火星了。
| 100 系列(信息) | |
| 100 | Continue(客户端可以继续发送未发完的请求) |
| 101 | Switch Protocals(服务端/客户端所使用的协议不一致) |
| 200 系列(成功) | |
| 200 | OK(成功) |
| 201 | Created(已按请求创建新资源) |
| 202 | Accepted(请求已被接受) |
| 203 | Non-Authoritative Information(从第三方获取的信息) |
| 204 | No Content(服务端没有可返回的数据) |
| 205 | Reset Content(客户端需重置请求内容) |
| 206 | Partial Content(服务端返回部分数据) |
| 300 系列(重定向) | |
| 300 | Multiple Choices(多个资源可用) |
| 301 | Moved Permanently(资源已被移动) |
| 302 | Found(临时在其他地址找到相应资源) |
| 303 | See Other(在其他地址找到相应资源) |
| 304 | Not Modified |
| 305 | Use Proxy |
| 306 | (Unused) |
| 307 | Temporary Redirect |
| 400 系列(错误) | |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Payment Required |
| 403 | Forbidden |
| 404 | Not Found |
| 405 | Method Not Allowed |
| 406 | Not Acceptable |
| 407 | Proxy Authentication Required |
| 408 | Request Timeout |
| 409 | Conflict |
| 410 | Gone |
| 411 | Length Required |
| 412 | Precondition Failed |
| 413 | Request Entity Too Large |
| 414 | Request-URI Too Long |
| 415 | Unsupported Media Type |
| 416 | Requested Range Not Satisfiable |
| 417 | Expectation Failed |
| 500 系列(服务器错误) | |
| 500 | Server Internal Error |
| 501 | Not Implemented |
| 502 | Bad Gateway |
| 503 | Service Unavailable |
| 504 | Gateway Timeout |
| 505 | HTTP Version Not Supported |
开始还满怀信心的打算拿 Perl 写一个文件上传管理程序,可是在写完了登陆部分之后就泄气了。原因很简单,服务器不支持 CGI::Session,而我又不想花时间去研究 Perl Cookie。
其中登陆部分采用了《突发奇想,小改动解决安全问题》其中的方法。
看来要重操 PHP 旧业了……
这几天一直在琢磨用 Perl CGI 架设网站,正好在网上看到了一篇关于 CGI 安全的文章,里面提到了数据库注入和远程执行等等安全问题。也就是说,比较安全的方法是屏蔽一系列特殊字符(比如说,管道“|”、引号“" '”、斜线“/”等等)。今天偶然间突发奇想,如果换一种思路,不需要过滤特殊字符也能做到脚本安全。
具体方法如下。(假设:用户名与密码存在 user 表中,密码用 md5 加密)
由于 md5 hash 不包括任何特殊字符,所以这段脚本对数据库无害。
优点总结:由于传递给数据库的字符串当中不包括任何特殊字符,因此没有任何注入危险。
缺点总结:一般来说,用户数据表都是拿用户名做索引,所以按密码查询效率相对低一些。但是考虑到用户登录的频繁程度,这个缺点就无所谓了。
终于看完了第12集。整个片子的压抑气氛跟《Elfan Lied》相比有过之而无不及。从11集开始的气氛骤降压得人喘不过气,12集的结局更是雪上加霜。如果我的内心像世界一样,12集过后我也会拿起刀。
回头重观整部动画,世界在我心中的印象大大改变。如果说在片子开头我喜欢的是柔弱的言叶(事实上在出国前的确是这样),那么到最后,占据着内心的却是世界(就像现在这样)。
回想2004年热火朝天的《君が望む永遠》,当时我还是遥的坚定拥护者,水月结局曾让我失落过一个时间。现在看看,比起这会儿把三个 Bad Ending 捏在一起,至少那会儿还是个 Good Ending。呵呵,如果真的要个 Good Ending 的话,恐怕就是刹那或者光的天下了。
总之,在这穷乡僻壤,很久没见到这么震撼人心的片子了(虽然是动画)。就让我跟世界同在吧,我才不要人渣诚的终结……
Linux BusyBox 果真是个强大的东西。只要想做,什么都能做出来。正好最近正愁 My Book 的服务总是莫名其妙的挂掉,搞的在单位都无法访问文件。操起简单的 vi,开始制作 Bash Watchdog。(之所以没用 Perl,是考虑到 Perl 在预编译的时候比较耗费系统资源)
经过三个小时的现学现卖,雏形版的 Bash Watchdog - swatchdog 出炉。
原理很简单,无限循环,检查命令行传入的进程是否存在。如果不存在则重启。
使用也很简单。
自动侦测 cvm(mionet)、transmission 和 amuled。
意外的惊喜!感谢实习单位里的一位姐姐,每个人都拿到了一套 Tundra 的芯片。当然,这些芯片基本上都是 RMA 回来的,已经不能工作了。但至少可以作为个人收藏(毕竟是我的第一份工作)。
废话少说,上照片!
从上到下依次是:
Tsi106, Tsi340, Tsi350, Tsi574, Tsi578
Tsi107, Tsi400, QSpan, Tsi576, Tsi564
Tsi108, Tsi109, 未知芯片(应该是Tsi107), Tsi107芯片基板
OK, for some reasons, I write this article in English. I bet you Chinese can understand it.
The problem was simple. Globat's servers got down on Feb. 21, because of switch problem. Well, that was not the critical impact.
On Feb 23 afternoon, I found my database got problem, probably database crashed. I talked to their technical support. They told me they were working on it, and needed sometime. I thought it was acceptable. But then, things got much worse.
On Feb 23 evening, the database was still down. Technical support suggested me to issue a ticket. I did. Then, I still hoped it would be better.
On Feb 23 night, I got the first (and the only) response to that ticket. It was said they were taking care my issue.
On Feb 24, they told me they had fixed the problem. But again, my database was still reporting errors. Then, they changed to another word, saying they were trying to fix the problem.
On Feb 25, the problem was still hanging my websites. They were still saying to fix it.
On Feb 26, they told me, hopefully, they would fix the problem by both recovering from previous backup and fixing existing database. I got confused and totally lost my patience.
On Feb 27, I tried use phpMyAdmin to repair tables, and got all tables recovered except one of them. Finally, I got a happy ending by myself. Definitely, they were still "fixing the problem".
As of that time, all my websites have been down for almost a week. Those websites include, snailium.net, blue-dv.net and sdfzlt.cn.
I tried to search "Globat problems" in Google. It seems Globat has problem to deal with customers frequently. I have no more passion on a troublesome web server. Therefore, I temporarily moved to Lunarpages, under xiaoqiangnet.com.
Further, I will shut down all my websites on Globat and move them all to a new server, although they are still fixing the problem.
Here is HOWTO add nethostfs on Western Digital My Book World Edition. For Chinese version, visit here(中文版).
Prerequisite: Enable SSH on My Book.
Step 1. Download nethostfs v1.5 source code, unpack and compile.
Step 2. Create shared folder /PSP/ through My Book Storage Manager.
Step 3. Create service script nethostfs under /etc/init.d/.
Step 4. Make start/stop link under /etc/init.d/.
Step 5. Reboot My Book World Edition
Note 1 - nice -n 10 is used in service script to adjust process priorities, in order to avoid nethostfs consumes too much CPU resource.
Note 2 - This works perfect for iRshell, as well as PPA (which uses iRshell's WiFi code)
Western Digital My Book 所使用的 BusyBox 可塑性还是很高的。
想到正好在用 PPA 在 PSP 上通过 WiFi 看电影,干脆把 nethostfs 服务也集成到 My Book 里面好了。(English Version)
前期准备:在 My Book 上加装 SSH 服务。
第一步:按照下面的方法下载 nethostfs v1.5 源代码,解包,编译。
第二步:通过 My Book 共享储存管理器建立 PSP 共享文件夹。
第三步:在 /etc/init.d/ 下建立 nethostfs 服务脚本。
第四步:在 /etc/init.d/ 下建立相关启动/关闭服务链接。
第五步:重启 My Book。
注意 1:在服务脚本中,使用了 nice -n 10 调整进程的优先级,防止 nethostfs 占用过多资源。
注意 2:此方法也适用于 iRshell。(PPA 的 WiFi 部分使用的是 iRshell 的源代码)
| 日 | 一 | 二 | 三 | 四 | 五 | 六 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |