2011年11月26日

Google 瀏覽器 (chrome) 直接以 無痕模式 啟動

"C:\Documents and Settings\Administrator\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --incognito

2011年8月31日

Fedora 自動登入

Fedora 想要在開機之後會自動用某個帳號登入,
# vi  /etc/slim.conf
default_user username
auto_login yes

2011年7月7日

由client端判斷時間,捉取更新網頁

當使用者端連進來時,
由 index.php 負責判斷時間,
當上一個連線與這一個連線時間小於 600 秒,
就讀取 index2.htm ,
如果上一個連線與這一個連線時間已超過 600 秒,
就會乎叫 get.php ,
重新將 RSS 的網頁讀取進來,
並寫到 index2.htm 裡面去,
供下一次 600 秒內的使用者閱讀。

目的:避免在短時間有大量的 PHP 處理程序將資源吃光。

index.php
<?php
$t=time();
$fp = fopen('timestamp.txt', 'r');
$datatime=fgets($fp,12);
$t2=$t-$datatime;

if ($t2<600){include("index2.htm");
} else {
include("get.php");
}
?>

get.php
<?php
$siteurl = "http://samba.tw/rss.php";
$content = file_get_contents($siteurl);
echo $content;

$fp2 = fopen('index2.htm', 'w');
fwrite($fp2,$content);
fclose($fp2);

$t=time();
$fp = fopen('timestamp.txt', 'w');
fwrite($fp,$t);
fclose($fp);
?>

index2.htm (空白檔案即可,注意要有寫入的權限)

timestamp.txt(空白檔案即可,注意要有寫入的權限)

2011年7月1日

網頁版批踢踢 (web ptt.cc)

如果無法用 telnet 連進 ptt.cc 進行 BBS 的操作~
可以選用網頁方式進行瀏覽
http://www.ptt.cc/bbs/index.html
雖然沒有 BBS 那麼多功能,
但是簡易的閱讀也可以止一下渴啦!

2011年5月31日

Plop 實現舊電腦用 USB 開機

早期有些舊電腦的 BIOS 不支援從 USB 開機,
Plop 可以實現了!

下載 Plop 之後,
將 ISO 檔燒進光碟,
再將這片光碟放到主機光碟中,
主機會從光碟開機,
進入光碟開機之後,
就會有 USB 開機的選項了。

PS:另有 plpcfgbtGUI.exe 可以編輯 .bin 檔,修改開機選項設定。修改完記得用 UltraISO 之類的軟體,將 .bin 檔燒回 .ISO 檔內喔!