Wednesday, September 12, 2012

Pretty-Printing Ruby as used in Chef

Chef doesn't have meaningful filenames -- override the page's title to make the output more readable.  The below makes two pages of code be printed on a single page of output, so you don't wind up paper pushing too much when reviewing code.


enscript --fancy-header --nup=2 -Eruby --color -whtml -pz.html --title='recipes/web' default.rb 


enscript --fancy-header --nup=2 -Eruby --color  --title='recipes/web' default.rb 

Print all non-empty files in the Python directory, make pretty like Ruby scripts:

egrep -r . python | awk -F: '/rb:/ {print $1}' | sort -u | xargs enscript --fancy-header --nup=2 -Eruby --color

Friday, September 7, 2012

SNMP on Ubuntu

The 1970's were a long time ago, but the default SNMP (Simple Network Mangement Protocol) stuff on Ubuntu is broken by default.

To fix, edit files and run scripts per the following nice blog posts:

- use minimal setup via SNMPAgent

- download lookup files via magic script: snmp on Ubuntu Oneric