Wednesday, November 30, 2011

Linux Virtual Network Interfaces

http://ar.linux.it/docs/vinter/vinter.html

Monday, November 21, 2011

LKDDb: Linux Kernel Driver DataBase

http://cateee.net/lkddb/

Friday, November 18, 2011

Intel Active Management Technology (AMT) introduction

http://www.opengear.com/SP-AMT.html

http://linux.die.net/man/7/amt-howto

http://linux.die.net/man/1/amttool

Thursday, November 10, 2011

vi copy,paste, move cursor around braces

copy: yy
paste: p

move cursor to the corresponding braces: %

move cursor up down for one code block or function: [],{}



ref:



http://www.unix-manuals.com/refs/vi-ref/vi-ref.htm

Wednesday, November 2, 2011

Tuesday, November 1, 2011

Global variable in python

http://docs.python.org/faq/programming.html#what-are-the-rules-for-local-and-global-variables-in-python

http://stackoverflow.com/questions/423379/using-global-variables-in-a-function-other-than-the-one-that-created-them

In short, when modify the global variable in a function, need to explicitly define "global g_sth". This is to avoid using global variables.

Python tutorial and start up script

tutorial:
start up script:

from optparse import OptionParser
import sys
def main():
   usage = "usage: %prog [options] arg"
   parser = OptionParser(usage)
   parser.add_option('-d', '--directory',
           action='store', dest='directory',
           default=None, help='specify directory')
   parser.add_option('-f', '--file',
           action='store', dest='filename',
           default=None, help='specify file')
   parser.add_option('-v', '--version',
                     action="store_true", dest="show_version",
                     default=False, help='displays the version number')
   if len(sys.argv) == 1:
       parser.print_help()
       sys.exit()
   (options, args) = parser.parse_args()
   # rest of program...
if __name__ == '__main__':
   main()