Tuesday, August 14, 2007

Syntax Highlighting Tool

Blogger does not have integrated syntax highlighting. So here is a quick solution.

My OpenBSD way of having colored man pages.

Here is something you can put in your .bashrc file for colored man pages:

# My OpenBSD way of having colored man pages. Its kind of nasty.
alias vmore="/usr/local/share/vim/vim70/macros/less.sh"
function vman {
        manfiles=`man -w $1`
        for manfile in $manfiles;
                col -b < $manfile | vmore -V0 -i NONE -c "set verbose=0 ft=man nomod nolist titlestring=MANPAGE" -

Controlling Storybord Class

Today got burned by storyboard. So a tip I have is storyboard.Begin(this,true); since Storyboard class will not throw an exception if its not able to stop. This kind of seems a lot different then most other classes in .NET and WPF. If the function is not enabled or able to be used why the hell wouldn't it throw an exception! Who knows, just another hacked together thing by Microsoft.

Monday, August 13, 2007

Design Patterns

Anatomy of the Linux networking stack

Here is a simple article on the Linux network stack. Nothing ground breaking but a nice read or refresher if you have not done any kernel programming in awhile.