發表文章

USB 相關

USB 相關     先記錄,再研究 1. USB Host 簡介     http://pollos-blog.blogspot.tw/2015/08/usb-host.html 2. USB Video Class 簡介     http://pollos-blog.blogspot.tw/2014/10/usb-video-class.html 3. USB PTP/MTP 簡介     http://pollos-blog.blogspot.tw/2014/10/usb-ptpmtp.html 4. RS232 over USB 簡介     http://pollos-blog.blogspot.tw/2014/10/rs232-over-usb.html 5. USB Mass Storage Class 簡介     http://pollos-blog.blogspot.tw/2014/10/usb-mass-storage-class.html 6. USB 簡介     USB 簡介[1]    http://pollos-blog.blogspot.tw/2014/07/usb-1.html     USB 簡介[2]    http://pollos-blog.blogspot.tw/2014/07/usb-2.html     USB 簡介[3]    http://pollos-blog.blogspot.tw/2014/07/usb-3.html     USB 簡介[4]    http://pollos-blog.blogspot.tw/2014/07/usb-4.html     USB 簡介[5]    http://pollos-blog.blogspot.tw/2014/07/usb-5.html     USB...

monitor tar-progress in linux using pv command

tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{print $1}') | gzip > big-files.tar.gz 4.69GB 0:04:50 [16.3MB/s] [==========================> ] 78% ETA 0:01:21 $ pv big-files.tar.gz | tar xjf - -C target_directory reference:         http://www.tecmint.com/monitor-copy-backup-tar-progress-in-linux-using-pv-command/

distcc

distcc is a tool for speeding up compilation of source code by using distributed computing over a computer network. 此工具就是可以把編譯進行分散式的處理,相當方便快速。 利用 3 台 pc 實現 distcc ... 1. 先安裝好 apt-get install distcc 2. 在每台 pc 時,開啟 distcc daemon server     # distccd --daemon --allow 127.0.0.1 --allow 10.100.90.0/24 3.   time make -j10 CC="distcc arm-arago-linux-gnueabi-gcc" CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage real 1m48.143s user 5m55.716s sys 0m12.236s  export DISTCC_HOSTS="localhost 10.100.90.232 10.100.90.240"  time make -j10 CC="distcc arm-arago-linux-gnueabi-gcc" CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage real 1m4.804s user 2m45.832s sys 0m8.844s  export DISTCC_HOSTS="--randomize localhost 10.100.90.232 10.100.90.240,cpp,lzo"  time distcc-pump make -j16 CC="distcc arm-arago-linux-gnueabi-gcc" CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage real 0m59.147s user 2...

Windows Installer Errors 2738 and 2739

2738, Could not access VBScript run time for custom action. 2739, Could not access JScript run time for custom action. VBScript 1. regedit,刪除機碼 "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" 2. 用Administrator的身份啟動命令提示字元,然後執行以下指令: 64-bit version of Windows: cd c:\windows\syswow64 regsvr32 vbscript.dll 32-bit version of Windows: cd c:\windows\system32 regsvr32 vbscript.dll JScript 1. regedit,刪除機碼 "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}" 2. 用Administrator的身份啟動命令提示字元,然後執行以下指令: 64-bit version of Windows: cd c:\windows\syswow64 regsvr32 jscript.dll 32-bit version of Windows: cd c:\windows\system32 regsvr32 jscript.dll referencd: https://tw.answers.yahoo.com/question/index?qid=20100713110248AAGkno2   https://blogs.msdn.microsoft.com/heaths/2007/05/31/windows-installer-errors-2738-and-2739-with-script-custom-actions/   http://boyilee.blogspot.tw...

使用 Git Mirror 無痛轉移 Git Server

使用 Git Mirror 無痛轉移 Git Server git clone mirror 選項,它可以把整個 repo 的資訊都 clone 下來,包括 branches, tags 再用 git push --mirror 把整包都丟到新的 git server 上面的 repo 裡。 Example     整包 clone 下來     1.                 git clone --mirror gitolite@git.lab317.org:dinos80152/Authentication     2.         到 gitlab 建一個空的 repo     3.         進到專案資料夾,設定新的遠端 git repo 位置             cd Authentication.git/             git remote set-url --push origin git@gitlab.lab317.org:dinos80152/Authentication.git     4.         local 更新 remote branch,因為是新的 repo,就是將本地的 origin/xxx 都刪囉。-p == --prune             git fetch -p origin     5.     ...

複製 git source code 到 新的 git server 並保持所有 commit

如果你想從 Git server 那裡複製一份源代碼到新的 Git server 上的話,可以通過以下步驟來操作。 1). 從原地址克隆一份裸版本庫,比如原本託管於 GitHub。     git clone --bare git://github.com/username/project.git 2). 然後到新的 Git 服務器上創建一個新項目,比如 GitCafe。 3). 以鏡像推送的方式上傳代碼到 GitCafe 服務器上。     cd project.git     git push --mirror git@gitcafe.com/username/newproject.git 4). 刪除本地代碼     cd ..     rm -rf project.git 5). 到新服務器 GitCafe 上找到 Clone 地址,直接 Clone 到本地就可以了。     git clone git@gitcafe.com/username/newproject.git 這種方式可以保留原版本庫中的所有內容。

Busybox ping & nslookup can't work & dns resolv error with bad address.

Busybox ping & nslookup can't work & dns resolv error with bad address. 1. bosybox can't build in static library     --> ping: ../sysdeps/unix/sysv/linux/getpagesize.c:32: __getpagesize: Assertion `_rtld_global_ro._dl_pagesize != 0' failed. 2. use strace : strace -tt -s99 -oLOG ping www.google.com --> libnss_dns.so.2    libnss_files.so.2    libresolv.so.2 缺少上面檔案. 補上就可以了.