The IEEE 802.1Q-in-Q VLAN Tag is purpose to expand the VLAN space by tagging the tagged packets, thus producing a "double-tagged" frame. The expanded VLAN space allows the service provider to provide certain services, such as Internet access on specific VLANs for specific customers, and yet still allows the service provider to provide other types of services for their other customers on other VLANs.
2010年7月14日 星期三
2010年7月5日 星期一
googlecl (Command line tools for the Google Data APIs)
GoogleCL brings Google services to the command line.
We currently support the following Google services:
We currently support the following Google services:
- Blogger
$ google blogger post --title "foo" "command line posting"
- Calendar
$ google calendar add "Lunch with Jim at noon tomorrow"
- Contacts
$ google contacts list name,email > contacts.csv
- Docs
$ google docs edit --title "Shopping list"
- Picasa
$ google picasa create --title "Cat Photos" ~/photos/cats/*.jpg
- Youtube
$ google youtube post --category Education killer_robots.avi
LINK:http://www.pcadv.com.tw/posts/2904-googlecl
2010年7月1日 星期四
Subversion, Grep, Diff
grep -r STRING *這兩個指令很好用。但是遇到 Subversion 的 working copy 時,就會受到 .svn 目錄的干擾。所幸這兩個指令都提供排除非必要目錄的方法:
diff -ur DIR1 DIR2
grep --exclude-dir=.svn -r STRING *
diff -x .svn -ur DIR1 DIR2
老實說,常會忘記這些參數,也常弄混。 因此建議在 .bashrc 當中加上以下設定,這樣以後不管是不是 working copy 都可以安心使用 grep -r 和 diff -r 了:
alias grep='grep --exclude-dir=.svn'
alias diff='diff -x .svn'
from Rupert's blog :http://softsmith.blogspot.com/2009/03/subversion-grep-diff.html
C/C++ Predefined Macros
寫程式經常會用到編譯器預先定義的巨集 (Predefined Macros),例如:__FILE__、__LINE__、__DATE__、__TIME__、__func__ 等。這些巨集有些是標準 C/C++ 語言所定義的,有些則是編譯器自行定義的。使用 GNU C/C++ 的人,可參考以下資料:
echo | gcc -dM -E - | sort
Predefined Macros (GNU C/C++)這份資料所提到的 System-specific Predefined Macros 是指針對不同的系統平台 (arm、mips 等),編譯器所預先定義的特殊巨集。若想直接看看這些預先定義的巨集,可執行以下指令:
echo | gcc -dM -E - | sort
http://softsmith.blogspot.com/2009/07/cc-predefined-macros.html
2010年6月30日 星期三
ssh keygen 免輸入密碼
懶得打密碼, 以 key 做認證登錄.
步驟如下:
簡單解說一下:
之後連線時, 就會用本機的 private key(id_rsa) 與遠端電腦的 public key(authorized_keys) 做認證, 確認完成就可以直接登入, 不需輸入帳號密碼, 而且也比較安全.
如果你想要瞭解密碼免登入的原理的話,請參考徹底瞭解 SSH 的免密碼登入
步驟如下:
- ssh-keygen -t rsa 或 ssh-keygen -d (dsa) => 產生出 id_rsa, id_rsa.pub
- scp id_rsa.pub server_hostname:~/.ssh/
- ssh server_hostname
- cat .ssh/id_rsa.pub >> .ssh/authorized_keys 即可
- 這樣子就可以 key 認證登入, 不需輸入密碼.
簡單解說一下:
- id_rsa: private key
- id_rsa.pub: public key
之後連線時, 就會用本機的 private key(id_rsa) 與遠端電腦的 public key(authorized_keys) 做認證, 確認完成就可以直接登入, 不需輸入帳號密碼, 而且也比較安全.
如果你想要瞭解密碼免登入的原理的話,請參考徹底瞭解 SSH 的免密碼登入
http://plog.longwin.com.tw/post/1/293
巧妙移除PDF文件的浮水印
PDF電子文件為了標示文章的來源出處,有時候會在頁面加入浮水印,但是浮水印若是插在文中很容易造成閱讀上的不便,你可以利用Adobe Acrobat 6的「TouchUp」文字工具,來移除PDF上文字的浮水印。
STEP:
1.在Adobe Acrobat中開啟要移除浮水印的PDF檔,然後在功能表按下【工具】→【進階編輯工具】→【TouchUp文字工具】。
2.接著在浮水印文字上按住滑鼠左鍵拖曳選取,然後按一下滑鼠右鍵,在快速選單選擇【內容】。
3.開啟「TouchUp內容」對話盒後,按下「填充」色塊,然後在色盤上選擇「無色彩」,再按下〔關閉〕按鈕。
4.回到Acrobat視窗後,可以看到每個頁面中的浮水印全部都消失了哦,這時候就可以將它另存新檔囉!
STEP:
1.在Adobe Acrobat中開啟要移除浮水印的PDF檔,然後在功能表按下【工具】→【進階編輯工具】→【TouchUp文字工具】。
2.接著在浮水印文字上按住滑鼠左鍵拖曳選取,然後按一下滑鼠右鍵,在快速選單選擇【內容】。
3.開啟「TouchUp內容」對話盒後,按下「填充」色塊,然後在色盤上選擇「無色彩」,再按下〔關閉〕按鈕。
4.回到Acrobat視窗後,可以看到每個頁面中的浮水印全部都消失了哦,這時候就可以將它另存新檔囉!
http://blog.xuite.net/wcwu1/vicky/9523182
訂閱:
文章 (Atom)
How to repair and clone disk with ddrescue
ddrescue is a tool that can be used to repair and clone disks on a Linux system . This includes hard drives, partitions, DVD discs, flas...
-
From: http://blog.chinaaet.com/justlxy/p/5100064818 SMI:串行管理接口(Serial Management Interface),通常直接被稱為MDIO接口(Management Data Input/Output I...
-
from: https://www.wpgdadatong.com/tw/blog/detail?BID=B0594 一. PHY包含的各個子層 : PCS:編碼和解碼 PMA:串行器和反序列化器 PMD:取決於物理介質 Firgure 1: OSI模型裡示意...
-
在 前面我們所談的那些可以說是比較基本的東西,但是對於一份文件來說,光有前面所介紹的游標移動、刪除等等功能是不足夠的。面對一份文件我們通常會因為某些 緣故而使得我們必須去修改當中固定出現的字串樣式(pattern)成我們想要的樣子。最常遇到的就像中文文件的標點符號問題,或是 un...

