posts - 88, comments - 3, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          http://jsonview.com/

          posted @ 2012-02-17 15:35 Milo的海域 閱讀(411) | 評論 (0)編輯 收藏

          install xdebug
          yum install php-pear
          pecl install xdebug
          find / -name 'xdebug.so'

          config php.ini for xdebug extension
          ; load as zend ext
          zend_extension=/usr/lib64/php/modules/xdebug.so
          ; make sure profiler_enable disable
          xdebug.profiler_enable=off
          ; enable trigger
          xdebug.profiler_enable_trigger=on
          ; make sure web server has write privilege on output dir
          xdebug.profiler_output_dir=/tmp

          restart httpd
          send http request
          curl 'http://10.1.74.51/admin/php/adapter.php?action=getSystemChartsData&XDEBUG_PROFILE'

          get and analyze output log by kcachegrind





          posted @ 2012-02-17 12:58 Milo的海域 閱讀(257) | 評論 (0)編輯 收藏

          SVN account info will be stored in below dir on linux server:
          ${HOME}/.subversion/auth/svn.simple/

          posted @ 2012-02-17 11:38 Milo的海域 閱讀(237) | 評論 (0)編輯 收藏

          腳本里出現了相同邏輯被執行多次,需要重構代碼以減小代碼體積。

          Bash array的例子

          自己寫的例子

          #!/bin/sh
          a=('1' '2 2' '3 3 3')

          # echo whole array elements
          echo ${a[@]}
          # array length 
          len=${#a[@]}

          # loop array
          for ((i=0; i<=$len-1; i++))
          do
                
          echo ${a[$i]} 
          done

          # array insert
          a=()
          a
          =("${a[@]}" "a")
          a
          =("${a[@]}" "b b")
          echo ${a[@]}
                        

          blogjava的代碼高亮不支持unix shell,用PHP的湊合下。。。

          posted @ 2012-02-03 16:52 Milo的海域 閱讀(227) | 評論 (0)編輯 收藏

          iperf是個網絡帶寬的性能測試工具,但是直接yum install iperf是找不到源的。具體安裝方法如下:

          yum install iperf on centos5
          =======================
          wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
          rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
          rpm -K rpmforge-release-
          0.5.2-2.el5.rf.*.rpm
          rpm -i rpmforge-release-
          0.5.2-2.el5.rf.*.rpm
          yum install iperf


          yum install iperf on centos6
          =======================
          wget  http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
          rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
          rpm -K rpmforge-release-
          0.5.2-2.el6.rf.*.rpm
          rpm -i rpmforge-release-
          0.5.2-2.el6.rf.*.rpm
          yum install iperf

          iperf使用示例
          on 10.1.74.51
          iperf -s

          on 10.1.74.76
          [root@xen74v02 db1]# iperf -c 10.1.74.51 -B 10.1.74.76
          ------------------------------------------------------------
          Client connecting to 
          10.1.74.51, TCP port 5001
          Binding to local address 
          10.1.74.76
          TCP window size: 
          16.0 KByte (default)
          ------------------------------------------------------------
          [  3] local 10.1.74.76 port 5001 connected with 10.1.74.51 port 5001
          [ ID] Interval       Transfer     Bandwidth
          [  3]  0.0-10.0 sec  1.03 GBytes    884 Mbits/sec

          posted @ 2012-02-03 13:49 Milo的海域 閱讀(8690) | 評論 (0)編輯 收藏

          從源碼安裝mysql時指定默認字符集:
          1. ./configure ... '--with-charset=utf8' '--with-collation=utf8_general_ci' ...
          2. make & make install
          3. start mysql instance

          驗證:



          也可以在my.cnf里面修改默認字符集:

          default-character-set=latin1



          posted @ 2012-01-31 13:18 Milo的海域 閱讀(291) | 評論 (0)編輯 收藏

          僅列出標題
          共9頁: 上一頁 1 2 3 4 5 6 7 8 9 
          主站蜘蛛池模板: 马关县| 正定县| 锦屏县| 榆林市| 乐业县| 伊宁市| 会昌县| 修水县| 岑巩县| 拉萨市| 彩票| 吉安县| 平武县| 台山市| 长沙县| 九龙坡区| 剑河县| 晴隆县| 五指山市| 绥宁县| 丹东市| 游戏| 夹江县| 义马市| 绩溪县| 沁水县| 巴塘县| 明溪县| 错那县| 双城市| 湟源县| 临江市| 丹寨县| 黔东| 社旗县| 大竹县| 甘谷县| 醴陵市| 方城县| 长沙县| 水城县|