URL rewrite 的 + 與 %20 的問題

現在流行 Rewrite 讓網址美化,所以 Web server (Nginx、Apache...) 都會使用 rewrite module 來達成。

不過 Rewrite 常常會遇到各種符號的問題,例如下述:

上述在 Apache 的 mod_rewrite 會遇到的問題大概都解決了,但是現在遇到 Nginx + fastcgi 的模式,開始又有一些其它問題出現,如下範例:

  1. 標題: dvd player
  2. 網址自動轉換成: dvd+player
  3. 再到 PHP 端就用 dvd+player 去找,就找不到此篇文章
  4. 這問題要怎麼解決呢?

閱讀全文〈URL rewrite 的 + 與 %20 的問題〉

張忠謀 關於如何培養自信的說法

台積電的創辦人 - 張忠謀 先生,沒想到他這麼幽默。

  • 張忠謀 在回覆如何培養自信的問題的說法:「比如說你要選總統,卻沒有自信,你只要看看別人做總統是怎麼樣,就有自信了。

註:我開始覺得自己充滿自信了。

取自:【直擊 】張忠謀一句話 讓施振榮樂到筆都掉了

Let's Encrypt 的 SSL 憑證安裝

Let's Encrypt 現在 Limited Beta test,前幾天申請測試,很快就發下來了。

附註:

  1. 不知道 Let's Encrypt 的可見此篇:Lets’s Encrypt 將提供免費 SSL(HTTPS) 憑證給整個 Web 使用
  2. 安裝過程有遇到一點小問題,紀錄安裝過程,以後最晚每三個月都要執行一次。
  3. 內附程式的 Script 會自動判斷系統、Apache、Nginx 等資訊

閱讀全文〈Let's Encrypt 的 SSL 憑證安裝〉

PHP 截出 圓形(橢圓形)的圖片

PHP 要截圖可以參考此篇:PHP 要截圖片的某個區塊(截圖)

上述截圖的圖片是方形的,想要截出圓形的圖片,要怎麼做呢?

註:此篇文章的需要透明背景,所以還是以 png 為主。

閱讀全文〈PHP 截出 圓形(橢圓形)的圖片〉

將圖片轉換成 CSS 的線上服務

這個服務做的很有趣,拖拉任何圖片上去,都可以幫你轉換成 CSS Code,然後直接將此圖片畫在頁面上。

  • 詳見:img2css - This is a tool that can convert any image into a pure css image

註:測試建議丟小張點的圖片,此服務看來是依照每個 px 的色碼分析後,全部照著寫出來,圖片太大張的話,產生出來的文字會很驚人。

Linux 修正大量 GPG error BADSIG 的問題

Debian / Ubuntu Linux 遇到大量的 GPG error (BADSIG) 要怎麼解決呢?

錯誤訊息如下述:

問題1

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com stable Release: 以下簽名無效: BADSIG A040830F7FAC5991 Google, Inc. Linux Package Signing Key \<linux-packages-keymaster@google.com\>
W: 無法取得 http://dl.google.com/linux/mod-pagespeed/deb/dists/stable/Release,
W: Some index files failed to download. They have been ignored, or old ones used instead.

問題2

W: GPG error: http://dl.google.com stable Release: The following signatures were invalid: BADSIG A040830F7FAC5991 Google, Inc. Linux Package Signing Key \<linux-packages-keymaster@google.com\>
W: GPG error: http://security.ubuntu.com precise-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key \<ftpmaster@ubuntu.com\>
W: GPG error: http://extras.ubuntu.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key \<ftpmaster@ubuntu.com\>
W: GPG error: http://ppa.launchpad.net precise Release: The following signatures were invalid: BADSIG 531EE72F4C9D234C Launchpad webupd8
W: GPG error: http://in.archive.ubuntu.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key \<ftpmaster@ubuntu.com\>
W: GPG error: http://in.archive.ubuntu.com precise-updates Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key \<ftpmaster@ubuntu.com\>

閱讀全文〈Linux 修正大量 GPG error BADSIG 的問題〉