screenrc

; ---
screen -t ROOT  0  bash
screen -t D1  1  bash
screen -t D2  2  bash
screen -t D3  3  bash
screen -t D4  4  bash
screen -t D5  5  bash
screen -t D6  6  bash
screen -t D7  7  bash
screen -t D8  8  bash
screen -t D9  9  bash
select 1

startup_message off

# MY CAPTION
caption always "%H-(%n) %t %c"

; ---

bike中社路+風櫃嘴

騎完中社路還不過癮, 繼續騎風櫃嘴
下滑風櫃嘴…我說 “god 一直拉煞車…手都快斷掉了”
黃同學說 “奇怪? 剛剛是怎麼騎上來的?”

今天還有一件豬頭事….帶了 logger 但就是忘記忘記按下開始記錄
看來要再來一次

裝了 SyntaxHighlighter Plus , 程式碼可以看清楚了

SyntaxHighlighter Plus

It supports the following languages (the alias for use in the post is listed next to the name):

* Bash — bash, sh
* C++ — cpp, c, c++
* C# — c#, c-sharp, csharp
* CSS — css
* Delphi — delphi, pascal
* Java — java
* JavaScript — js, jscript, javascript
* PHP — php
* Python — py, python
* Ruby — rb, ruby, rails, ror
* SQL — sql
* VB — vb, vb.net

* XML/HTML — xml, html, xhtml, xslt

修改 … /wp-content/plugins/syntaxhighlighter-plus/shlfiles/SyntaxHighlighter.css
把 .dp-highlighter 的 width 改成想要的寬度

[code language=C]
#include
main() {
printf(“Hello World!”);
}

[/code]

設定 .htaccess 讓 網址比較短

CodeIgniter – Open source PHP web application framework

設定 .htaccess 讓 網址比較短

codeigniter 網頁提到
http://codeigniter.com/user_guide/general/urls.html

可以把www.your-site.com/index.php/news/article/my_article
變成
www.your-site.com/news/article/my_article

步驟:
改 apache 的 virtual host file
Options FollowSymLinks
在 /xxx/username/ci/ 下建 .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteRule ^(.*)$ /rimmon/ci/index.php/$1 [L]
</IfModule>

check email 存不存在

if ($_SERVER[argc]<2) {
  printf("Usage : %s filename\n",$_SERVER['argv'][0]);
  exit;
}

$filename=strftime("%H%M.txt");
$out=fopen($filename,"a");

$counter=0;
$fp=fopen($_SERVER['argv'][1],"r");
while ($data=fgets($fp,2000)) {
  $data=str_replace("\r","",$data);
  $data=str_replace("\n","",$data);
  if (checkmail($data)==TRUE) {
    printf("%s : %s \tGOOD_EMAIL!\n",$counter,$data);
    fputs($out,$data."\n");
  } else printf("%s : %s \tBAD_EMAIL!\n",$counter,$data);
  $counter++;
}
fclose($fp);
fclose($out);
exit;

// -------

function checkmail($mail){
  $host = explode('@',$mail);
  list($account,$host) = $host;

  if (!getmxrr($host,$mxa)) $mxa = array($host);
  while (list ($key, $mx) = each($mxa)) {
    if ($mxg = @fsockopen ($mx,25,$ir,$sr,5)) {
      $out = fgets($mxg, 1024);
      if (substr($out,0,3) == "220") {
        fputs ($mxg, "HELO example.com\r\n");

        $out = fgets ( $mxg, 1024 );
        fputs ($mxg, "MAIL FROM: <{$mail}>\r\n");
        $from = fgets ( $mxg, 1024 );
        fputs ($mxg, "RCPT TO: <{$mail}>\r\n");
        $to = fgets ($mxg, 1024);
        fputs ($mxg, "QUIT\r\n");
        fclose($mxg);
        if (ereg ("^250", $from) && ereg ( "^250", $to )) return TRUE;
        return FALSE;
      }
      return FALSE;
    }
    return FALSE;
  }
  return FALSE;
}