2013年12月24日 星期二

Linux Traffic Control

Ubuntu 12.04 LTS


Traffic Shaping, Bandwidth Shaping, Packet Shaping with Linux tc htb
http://www.iplocation.net/tools/traffic-control.php
Strange....
I use his script, but found that setting 10kbit is actually 200kbit in real traffic. So I set 70kbit for 1400kbit.


Traffic Control HOWTO
http://linux-ip.net/articles/Traffic-Control-HOWTO/

A Practical Guide to Linux Traffic Control
http://blog.edseek.com/~jasonb/articles/traffic_shaping/

Bandwidth Limiting with IP Masquerade - Howto
http://www.szabilinux.hu/bandwidth/

Bandwidth Monitoring

Freshmeat.
These following tools are recommended:
bwm ==> very simple, ncurses based, for quick and easy overall network summary.
iptraf ==> very robust, ncurses based, my favorite, without kernel patch it lets you monitor specific host based on MAC Addresses
connmon ==> ncurses and gtk interfaces. With kernel patch you can monitor individual ip bandwidths

2013年12月23日 星期一

[GIT] Finding a branch point

Finding a branch point with Git? - Stack Overflow
http://stackoverflow.com/questions/1527234/finding-a-branch-point-with-git

git config --global alias.oldest-ancestor '!zsh -c '\''diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | head -1'\'' -'

2013年12月19日 星期四

tmux

C+b c 開新視窗
C+b n 或 space 切換到下一個視窗
C+b P 切換到上一個視窗
====視窗分割功能======
C+b " 水平分割視窗
C+b % 垂直分割視窗
C+b up or down 切換分割視窗
C+b + Ctrl + 方向鍵上/下/左/右
指令 exit 跳出當前分割視窗

C+b [ 捲動, 用PgUp/PgDn, q跳出

tmux ls :list sessions
tmux attach -t TARGET_SESSION: attach session

tmux教學 | 在水一方
http://blog.vic.mh4u.org/2012/707

使用 tmux 與 tmuxifier 打造 Console 開發環境(比 screen 更棒) - 玩物尚誌
http://blog.lyhdev.com/2013/01/tmux-tmuxifier-console-screen.html

終端機必備的多工良伴:tmux - @ChingHanHo
http://blog.chh.tw/posts/tmux-terminal-multiplexer/

Tmux 教學 + Screen 到 Tmux 的無痛轉換 - Tsung's Blog
http://blog.longwin.com.tw/2011/04/tmux-learn-screen-config-2011/

tmux 指令速查 | Midashuang's Blog
http://midashuang.wordpress.com/2010/12/07/tmux-%E6%8C%87%E4%BB%A4%E9%80%9F%E6%9F%A5/

2013年12月17日 星期二

DNP stands for "Do Not Populate" in schematics



Schematics says DNP... what do I put in ?
http://www.edaboard.com/thread32000.html
"Do Not Populate" means exactly what it says - do not put a resistor there.


2013年12月11日 星期三

Some 32-bit pre-built binary not work in 64-bit Ubuntu


Ubuntu 12.04.3 amd64 desktop

Some 32-bit pre-built binary might not work in 64-bit environment, e.g.:

# XXXX -v
bash: XXXX: No such file or directory
Some would report "bash: XXXX: Not found".

With 64-bit Ubuntu, install the following package fixed my problem:
apt-get install libc6:i386

64 bit - What happened to the ia32-libs package? - Ask Ubuntu
http://askubuntu.com/questions/107230/what-happened-to-the-ia32-libs-package

2013年12月8日 星期日

運動時間與脂肪的消耗

登山前一定要知道的事 – 燃料耗盡引起的疲勞 | 山姆伯伯工作坊
http://www.unclesam.cc/blog/what-food-should-you-take-hiking/

這些燃料能夠維持幾個小時的能量供給呢?若不休息持續的運動,脂肪可以維持「一星期」;而碳水化合物只能維持「不到1.5個小時」。因為即便是碳水化合物與脂肪各半燃燒,登山3小時後,碳水化合物就會先耗盡。
但碳水化合物即使不與脂肪混合也會燃燒,但脂肪卻必須與碳水化合物混合才能燃燒。因此,若碳水化合物耗盡,即使脂肪還存留許多,肌肉還是會變得無法運作的。
將碳水化合物視為燃燒脂肪時的燃燒觸媒,應該比較容易理解。因此,為了健康而想要多燃燒一些脂肪的話,反而應該要邊行走邊積極補充碳水化合物才是。什麼都不吃的行走方式,不僅會感到疲疲,也沒有燒到脂肪,等於是徒勞無功。
為什麼運動時間拉長,消脂效果更好? - iFit 愛瘦身
http://www.i-fit.com.tw/context/105.html
有氧運動的強度與能量消耗來源的介紹 (減重、燃脂) | 山姆伯伯工作坊
http://www.unclesam.cc/blog/aerobic-exercise-intensity-and-energy-source/
在最大心跳的65~70%,持續60~90分鐘,消耗的脂肪是60%,而碳水化合物是40%。隨著強度愈高,消耗碳化化合物的比重就愈高。
燃脂:使用體脂肪做為燃料,而非碳水化合物(上) | 山姆伯伯工作坊
http://www.unclesam.cc/blog/fat-burning-using-body-fat-instead-of-carbohydrates-as-fuel/
影響脂肪氧化的因素(Factors affecting fat oxidation)【運動強度】Fatmax為強度為「最大攝氧量的62%~63% 或 最大心跳率的 70%~75%」;而鮮少進行訓練的人,Fatmax大約在最大心跳率的50%。

【飲食效果】高碳水化合物的飲食會抑制 脂肪氧化,而低碳水化合物的飲食導致提高脂肪氧化。在運動前數個小時,攝取碳水化合會提高胰島素的分泌並抑制脂肪氧化,幅度高達35%。用餐之後,胰島素 對於脂肪氧化的影響可能會持續6至8個小時,這意味著,禁食一夜之後,脂肪氧化速度會達到最高。
燃脂:使用體脂肪做為燃料,而非碳水化合物(下) | 山姆伯伯工作坊
http://www.unclesam.cc/blog/fat-burning-using-body-fat-instead-of-carbohydrates-as-fuel-2/
咖啡因(Caffeine)
燃燒體脂肪作為長跑的能量 @ 獵豹的瑣事 :: 痞客邦 PIXNET ::
http://jack197247.pixnet.net/blog/post/30504646-%E7%87%83%E7%87%92%E9%AB%94%E8%84%82%E8%82%AA%E4%BD%9C%E7%82%BA%E9%95%B7%E8%B7%91%E7%9A%84%E8%83%BD%E9%87%8F

2013年12月4日 星期三

DDR3 related

[wiki] DDR3
http://en.wikipedia.org/wiki/Ddr3

[wiki] CAS latency
http://en.wikipedia.org/wiki/CAS_latency

[wiki] DIMM
http://en.wikipedia.org/wiki/DIMM

[wiki] SO-DIMM
http://en.wikipedia.org/wiki/SO-DIMM

[wiki] Serial presence detect (SPD)
http://en.wikipedia.org/wiki/Serial_presence_detect

Annex K: Serial Presence Detect (SPD) for DDR3 SDRAM Modules
Document Release 3
http://www.jedec.org/sites/default/files/docs/4_01_02_11R21.pdf
SPD Revision 1.0
http://www.jedec.org/sites/default/files/docs/4_01_02_11R20.pdf

Understanding DDR3 Serial Presence Detect (SPD) Table
http://www.simmtester.com/page/news/showpubnews.asp?num=153 

[wiki] On-Die Termination (ODT)
http://en.wikipedia.org/wiki/On_Die_Termination

AN520: DDR3 SDRAM Memory Interface Termination and Layout Guidelines - an520.pdf
http://www.altera.co.jp/literature/an/an520.pdf