Tuesday, May 29, 2007

Wikimedia as a presentation application

I tried wikimedia slides extension at first. It worked fine. However, if you'd like to present on wikimedia, I recommend another interesting approach: one of the Firefox Greasemonkey scripts - Wikipedia Presentation.

Thursday, May 10, 2007

Add Mantis links to ViewVC (ViewCVS)

A small modification to ViewVC adding links to our mantis system:

--- lib/viewvc.py.orig  2007-05-10 10:39:10.000000000 +0800
+++ lib/viewvc.py       2007-05-10 11:17:00.000000000 +0800
@@ -973,10 +973,12 @@
 # addresses.  Note that the regexps assume the text is already HTML-encoded.
 _re_rewrite_url = re.compile('((http|https|ftp|file|svn|svn\+ssh)(://[-a-zA-Z0-9%.~:_/]+)((\?|\&)([-a-zA-Z0-9%.~:_]+)=([-a-zA-Z0-9%.~:_])+)*(#([-a-zA-Z0-9%.~:_]+)?)?)')
 _re_rewrite_email = re.compile('([-a-zA-Z0-9_.\+]+)@(([-a-zA-Z0-9]+\.)+[A-Za-z]{2,4})')
+_re_rewrite_mantis = re.compile('(issue)([\ \#]+)(\d{1,7})')
 def htmlify(html):
   html = cgi.escape(html)
   html = re.sub(_re_rewrite_url, r'<a href="\1">\1</a>', html)
   html = re.sub(_re_rewrite_email, r'<a href="mailto:\1&#64;\2">\1&#64;\2</a>', html)
+  html = re.sub(_re_rewrite_mantis, r'<a href="/mantis/view.php?id=\3">\1\2\3</a>', html)
   return html

 def format_log(log, cfg):
@@ -1310,6 +1312,7 @@
   html = pp.fontify(html)
   html = re.sub(_re_rewrite_url, r'<a href="\1">\1</a>', html)
   html = re.sub(_re_rewrite_email, r'<a href="mailto:\1">\1</a>', html)
+  html = re.sub(_re_rewrite_mantis, r'<a href="/mantis/view.php?id=\3">\1\2\3</a>', html)
   return html

 def markup_stream_php(fp, cfg):

I believe it would be quite easy to understand the modification, which substitutes 'issue #id' to an URL link to mantis system.

For automatically adding a note to mantis when commit to CVS, please reference CVS Integration in Mantis manual.

Wednesday, March 28, 2007

Running FreeBSD over MS Windows

Running FreeBSD on Microsoft Virtual PC 2007 step by step:

  1. download and install Microsoft Virtual PC 2007
  2. download the FreeBSD vmdk file from VMware's Virtual Appliance Marketplace - OS
  3. download and install VMDK to VHD converter (You may need .NET Framework to run it.)

Thursday, March 22, 2007

緣起

看到gen2linux在的blogger上的文章,想到好久之前也曾在這註冊了winfred,但忘了是用哪一個email註冊的… 唉,看來這個winfred.blogspot.com是要不回來了 >_<