Sunday, October 24, 2010

Daily Bookmarks 20101024

WWW::Mechanize && Google Group
http://fayland.org/journal/GoogleGroup.html

mechanize 教程
http://blog.hieee.com/2010/08/23/

python mechanize
 http://blog.cycu.org/?e=125

http://www.higherpass.com/Perl/Tutorials/Using-Www-mechanize/3/

http://funningboy.blogspot.com/2010_02_01_archive.html

Saturday, October 23, 2010

blog

fyblog
http://www.flyy.info/index.php

Saturday, October 16, 2010

Friday, October 15, 2010

Search by Hashing

Search by Hashing
intro.

參考來源:

"Some of the most common search algorithms are serial search, binary search and search by hashing. The tool for comparing the performance between the different algorithms is called run-time analysis. Here, we present search by hashing, and discuss the performance of this method. But first, we present a simple search method, the serial search and its run-time analysis."
- Search by Hashing (在「Google 網頁註解」中檢視)

Search by Hashing

Search by Hashing
intro.

參考來源:

"Search by Hashing"
- Search by Hashing (在「Google 網頁註解」中檢視)

Sunday, October 03, 2010

Run a command at boot with Gentoo

Normally in Gentoo you would want to create an init script via rc-update to start a service at boot. However if there are a few miscellaneous commands you would like to run you can add them to local.start.

The local.start init script is similar to rc.local in other distributions. It is the last init script to be run after all other services have been started at the end of the boot process.

Add your commands to local.start file located here.
/etc/conf.d/local.start

You can also make commands run when the system is shutdown. These commands should be placed in local.stop located here.
/etc/conf.d/local.stop

1 Comment
gentooShareThis

參考來源:

"Add your commands to local.start file located here. /etc/conf.d/local.start You can also make commands run when the system is shutdown. These commands should be placed in local.stop located here. /etc/conf.d/local.stop"
- Run a command at boot with Gentoo | WiredRevolution.com (在「Google 網頁註解」中檢視)

Gentoo init.d rc-update 寫法

Gentoo init.d rc-update 寫法
滿獨特方面的如果要再開機就載入某些程式的話可以用的方式

參考來源:

"注意到了嗎?因為我們沒有定義depend() 所以會有dependency warning,但是我們定義的start()就會有正確執行出來。 這種作法我個人認為是相當高度模組化的作法,不同於debian, redhat, mandrake,suse等其他Linux distribution甚至FreeBSD, 一般執行 rc script都是自己寫shell script,使用大量的case conditional來判斷自訂的start|stop|restart 行為,甚至FreeBSD還會判斷start|stop|restart的大小寫,增加rc script的複雜性以及撰寫與維護難度,gentoo這作法只要 follow他的runscript style來寫,"
- Gentoo Taiwan 討論區 • 檢視主題 - 想請問有關no-ip的開機自動執行辦法 (在「Google 網頁註解」中檢視)

Saturday, October 02, 2010

Daily Bookmarks 20101002

rsync - intro
http://www.ntu.beautifulworldco.com/weblog/?p=385

http://news.ols3.net/techdoc/old/rsync.htm

让Google Calendar显示在LINUX桌面
http://blog.netoearth.com/html/201008/%E8%AE%A9google-calendar%E6%98%BE%E7%A4%BA%E5%9C%A8linux%E6%A1%8C%E9%9D%A2.htm

Linux VNC 虛擬桌面
http://cha.homeip.net/blog/2010/09/2643.html

Quick reStructuredText

Quick reStructuredText

http://docutils.sourceforge.net/docs/user/rst/quickref.html
Being a cheat-sheet for reStructuredText
Updated $Date: 2009-07-14 10:05:34 -0400 (Tue, 14 Jul 2009) $

Copyright: This document has been placed in the public domain.

The full details of the markup may be found on the reStructuredText page. This document is just intended as a reminder.

參考來源:

"Quick reStructuredText http://docutils.sourceforge.net/docs/user/rst/quickref.html Being a cheat-sheet for reStructuredText Updated $Date: 2009-07-14 10:05:34 -0400 (Tue, 14 Jul 2009) $ Copyright: This document has been placed in the public domain. The full details of the markup may be found on the reStructuredText page. This document is just intended as a reminder."
- Quick reStructuredText (在「Google 網頁註解」中檢視)

Friday, October 01, 2010

Port Forwarding(SSH tunneling)

Port Forwarding(SSH tunneling)
張貼者: barkley 於 1/25/2010 01:09:00 上午 | 2010/01/25
透過 ssh and sshd 能夠轉移 TCP 通訊的傳輸
但是需要先瞭解難以理解且愚蠢的語法
-L clientport:host:hostport

參考來源: 熱血OB: Port Forwarding(SSH tunneling) (在「Google 網頁註解」中檢視)

Remote port forwarding - exposing an internal webserver

Example 4: Remote port forwarding - exposing an internal webserver

Remote port forwarding is sometimes useful for granting temporary access to services on clients which are otherwise unreachable (perhaps the client has an unreachable rfc1918 address behind a NAT or firewall). If the client is not configured to accept inbound SSH connections, this can be done with remote port forwarding on an outbound connection. (For OpenSSH, note that you may need to set "GatewayPorts yes" in "sshd_config" to achieve on the server what "ssh -g" would do on the client (allow any host to connect to the forwarded port).

Consider a PC which is running a webserver but is protected by firewall rules to accept no inbound connections (except from itself). Furthermore imagine this host has the unrouted private address 192.168.1.1 and can access the internet only outbound through a NAT. If you believe it is not too risky, you can briefly make that server publicly available with ssh port forwarding (such as while you're on the phone with someone) if you think the risk of serving sensitive data to a random hacker while it is publicly exposed is acceptably low and you can ssh from the PC to a host with a public address. To do so, you can establish an ssh connection such as this:

ssh -R4567:localhost:80 some-server
which will make it look like your PC's webserver is a server on "some-server" at port: 4567. Anyone who connects to:
http://some-server:4567/some/path
will get the same webpage you get on your PC when you connect to:
http://localhost:80/some/path

參考來源:

"ssh -R4567:localhost:80 some-server which will make it look like your PC's webserver is a server on "some-server" at port: 4567. Anyone who connects to: http://some-server:4567/some/path"
- NDC Logical Firewall - SSH Port Forwarding (在「Google 網頁註解」中檢視)

Promise Supertrak SX6000 Raid Card

Promise Supertrak SX6000 Raid Card
Q1.System 不要 Build 在 Array 內?

近來用一台 N 年前的高檔機器 HP LC2000 NetServer,其 CPU 為 P3-533 想說這機器放著也是放著,剛好拿來當 Backup Server 剛好,反正只裝 NFS Server 相信 P3-533 應該夠用了,安裝的 Raid Card 為 Promise SX6000,找到在 Google 上找到了一下些相關問題,順便就貼一下,主要是說 SX6000 所 Build 的 Array 最好是不要讓 System 也在內不然在系統 boot 時會出現不明的錯誤

參考來源:

"Q1.System 不要 Build 在 Array 內? 近來用一台 N 年前的高檔機器 HP LC2000 NetServer,其 CPU 為 P3-533 想說這機器放著也是放著,剛好拿來當 Backup Server 剛好,反正只裝 NFS Server 相信 P3-533 應該夠用了,安裝的 Raid Card 為 Promise SX6000,找到在 Google 上找到了一下些相關問題,順便就貼一下,主要是說 SX6000 所 Build 的 Array 最好是不要讓 System 也在內不然在系統 boot 時會出現不明的錯誤。"
- 不自量力 の Weithenn: Promise Supertrak SX6000 Raid Card (在「Google 網頁註解」中檢視)

CentOS 5.2+Raid 0+LVM+ISCSI配置详解

系统环境:CentOS 5.2

硬件配置:ASUS P5GC-MX +Intel E2160+Kinston 1GB 667*2+D-Link 530 1Gbps

硬盘1:Seagate 80GB/7200S/8MB/SATA

硬盘2:Seagate 1TB/7200S/32MB/SATA

硬盘3:Seagate 1TB/7200S/32MB/SATA

參考來源: CentOS 5.2+Raid 0+LVM+ISCSI配置详解 - LingPing的日志 - 网易博客 (在「Google 網頁註解」中檢視)