擷取.PNG
This article is to recording how to setup the develop android app environment on Linux.
[Environment]

ps030010 發表在 痞客邦 留言(0) 人氣()

Error message as below:
../../nan/nan.h:41:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
[Solution]
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --config gcc

ps030010 發表在 痞客邦 留言(0) 人氣()

The step as below:
sudo apt-get install libneon27
sudo mv /usr/lib/libneon-gnutls.so.27 /usr/lib/libneon-gnutls.so.27.old
sudo ln -s /usr/lib/libneon.so.27 /usr/lib/libneon-gnutls.so.27
sudo mv /usr/lib/libneon-gnutls.so.27 /usr/lib/libneon-gnutls.so.27.old
sudo ln -s /usr/lib/libneon.so.27 /usr/lib/libneon-gnutls.so.27

ps030010 發表在 痞客邦 留言(0) 人氣()

未命名
Node.js 算是目前最熱們的開發語言,所以我也開始探討未來應用在工作上的可能。
練習extensions "Hello world" module, Let's go.


 

ps030010 發表在 痞客邦 留言(0) 人氣()


最近用的JQuery Library是jquery-1.8.3.min.js,不過官網已經升級到 1.10.1.min.js and 2.0.2.min.js
所以這邊就來記錄一下

第一步要先考慮產品所使用的Browser走向,如果是Chrome, Firefox, Safari...(沒有support IE) 共喜你,就直接升級到 2.0.2.min.js(如果開發者是Base on 1.9.1.min.js)
如果不是請仔細的清掃目前介面所有的function,畢竟有些function在2.0.2上面是移除的,這邊就不在多講,請自行到官網看Changing log
如果你的產品是有支援IE系列的...,終究躲不過這個大魔王,連JQuery 開發團隊都為了IE特地分支出1.10.1,但想要享受2.0.2的效能,請將下列code放置到適當的位置

<!--[if lt IE 9]>
             <script type="text/javascript" src="/js/jquery-1.10.1.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
             <script type="text/javascript" src="/js/jquery-2.0.2.min.js"></script>
<!--<![endif]-->
注意紅色字體的部分,我之前在「黑暗執行緒」大大的文章→ http://blog.darkthread.net/post-2013-04-20-jquery-2-0.aspx,看到相關可以相容在IE7, 8, 9的寫法,但是實際在IE8的測試環境是有問題的,後來加了紅色字體之後,就正常哩!!



再來就可以順利享用了,來餵客官們吃菜
BTW,有一個效能測試網站如下
http://jsperf.com/jquery-1-7-2-vs-jquery-1-8/44
直接按Run Tests就可以看到分數了

ps030010 發表在 痞客邦 留言(0) 人氣()

IP Address
egrep "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"
MAC address
egrep "^([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}$"

ps030010 發表在 痞客邦 留言(0) 人氣()

8021x
由於工作需求,在此做個紀錄


實作環境

Ubuntu 10.04
freeradius-server-2.1.12
hostapd-1.0
wpa_supplicant-1.0
openssl-1.0.0e
libnl-1.1

ps030010 發表在 痞客邦 留言(1) 人氣()

p1
這篇文章是「Django的環境,轉移到 eclipse + ubuntu sambd 的建置」,在這邊做個紀錄


實作環境

Ubuntu 10.04
Django 1.4
Python 2.7.3

ps030010 發表在 痞客邦 留言(0) 人氣()

Screenshot-1
這次嘗試新的配置關於Lighttpd + Django + Fastcgi,為何會想要這麼做呢??
由於每次更改專案 web的版面、Layout 就改了「一偷拉庫」,說實在的效率大打折扣
看了網路上幾篇文章的分享,決定嘗試這樣的架構「Lighttpd + Django + Fastcgi」,在這裡做個紀錄

ps030010 發表在 痞客邦 留言(0) 人氣()

pcre.png

最近在玩web server效能,所以就拿Lighttpd + Fastcgi 來當測試對象
 


實作環境:

  • Ubuntu 10.04

  • Lighttpd 1.4.26

  • FastCGI 2.4.0


  • 下載位置:

  • Lighttpd 官網 →http://www.lighttpd.net/download

  • FastCGI官網→http://www.fastcgi.com/drupal/node/5




  • 安裝及設定

  • 安裝Lighttpd 


  •           1. 透過synaptic安裝Lighttpd 
    or
      1. download lighttpd-1.4.26.tar.gz
      2. #tar -zxvf lighttpd-1.4.26.tar.gz
      3. #cd lighttpd-1.4.26
      4. #./configure --prefix=/etc/lighttpd( 這邊可以依照你要的安裝路徑去放置)
               這邊如果出現錯誤訊息如下
                      
      5. 這時候會出現說pcre沒有找到
              官網→http://www.pcre.org/
          #tar -zxvf pcre-7.7.tar.gz
          #cd pcre 7.7
          #./configure
          #make;make install
              6. 再重新 # ./configure --prefix=/你要安裝的路徑
      7. #make;make install

  • 安裝FastCGI


  •   1. download fcgi-2.4.0.tar.gz
      2. #tar -zxvf fcgi-2.4.0.tar.gz
      3. #cd fcgi-2.4.0
      4. #./configure --preifx=/你要安裝的路徑
      5. #make
              這邊會出現錯誤訊息如下
          
      6. Google搜尋了一下,也有人碰到相同問題
          解決方式 
         #vim include/fcgio.h,在前面加入這段 #include <cstdio>
              7. 再重新# make;make install

  • Run CGI


  •   1. check /usr/local/bin裡面有沒有cgi-fcgi
      2. #cd /fcgi-2.4.0/examples
      3. #cp -rf .libs /etc/lighttpd/htdocs/
      4. #cp echo /etc/lighttpd/htdocs/echo.fcgi (將範例的fcgi丟到lighttpd server)
              5. #vim /etc/lighttpd/lighttpd.conf
      6. 將mod_auth&mod_fastcgi 前面的註解拿掉
    fastcgi.server = ( ".fcgi" =>
         ( "127.0.0.1" =>
             (
             "host" => "192.168.81.169",#填上你Server IP
             "port" => 1026,
             "check-local" => "disable"
             # "bin-path" => "/usr/bin/php-cgi"
             # "bin-path" => "/usr/local/bin/cgi-fcgi -bind -connect 127.0.0.1:1026"
             # "bin-path" => "./htdocs/echo.fcgi"
             )
         )
    )
    $HTTP["host"] == ".fcgi" {
       alias.url = ( "/fcgi-bin" => "/etc/lighttpd/htdocs/" )
    }
      7. #cgi-fcgi -start -connect 192.168.81.169:1026 /etc/lighttpd/htdocs/echo.fcgi 
      8.  然後在網址列上輸入 http://192.168.81.169/echo.fcgi
      如果有顯示出來就代表成功了,如果沒有的話重起lighttpd
      成功畫面
        

     


    參考文章
    http://calories.pixnet.net/blog/post/25207773-set-up-a-web-server-on-fedora11%3A-lighttpd%2B-fastcgi

    ps030010 發表在 痞客邦 留言(0) 人氣()

    1
    Blog Stats
    ⚠️

    成人內容提醒

    本部落格內容僅限年滿十八歲者瀏覽。
    若您未滿十八歲,請立即離開。

    已滿十八歲者,亦請勿將內容提供給未成年人士。