September 2011
1 post
Python 2.7 by default disables DeprecationWarnings. Re-enable in development using: python -Wdefault script.py
Sep 2nd
May 2010
1 post
Disable CD/DVD in OS X
cd /System/Library/Extensions sudo kextunload IOSCSIArchitectureModelFamily.kext/Contents/PlugIns/IOSCSIMultimediaCommandsDevice.kext  sudo kextunload IOBDStorageFamily.kext  sudo kextunload IODVDStorageFamily.kext  sudo kextunload IOCDStorageFamily.kext 
May 11th
April 2010
1 post
hashable objects in Python
If a class does not define a __cmp__() or __eq__() method it should not define a __hash__() operation either; if it defines __cmp__() or __eq__() but not __hash__(), its instances will not be usable in hashed collections. If a class defines mutable objects and implements a __cmp__() or __eq__() method, it should not implement __hash__(), since hashable collection implementations require that a...
Apr 7th
March 2010
3 posts
Quagga: using SNMP
snmpwalk -c public -v1 localhost .1.3.6.1.2.1.2 In netkit, Quagga by default has net-snmp support. Steps to get it working: /etc/snmp/snmpd.conf # # example access restrictions setup # com2sec readonly default public group MyROGroup v1 readonly view all included .1 80 access MyROGroup “” any noauth exact all none none # # the following line is relevant for Quagga # ...
Mar 4th
P.S. [OT]: The cisco command I use to disable the pager is: # terminal length 0 http://www.velocityreviews.com/forums/t330934-pexpect-module.html
Mar 4th
Quagga: dump bgp routes-mrt path not dump bgp routes path
Mar 1st
February 2010
4 posts
Powerful plug-in that enables Mac apps to leverage the color themes of the kuler community: http://www.lithoglyph.com/mondrianum/
Feb 16th
curl to resume a file killed in firefox/safari/etc: curl -o ‘myfile.zip.part’ -C - ‘http://download.com/myfile.zip’ -o to specify diff output file -C to specify resume -C - to resume and auto work out where to resume from bit after -C - is the url of the file to resume
Feb 2nd
Python: Elements common (or not) to two lists: diff_list = filter( lambda x: x not in listA, listB) diff_count = len(diff_list)
Feb 2nd
Regexhibit: OSX application for testing regular expressions. http://homepage.mac.com/roger_jolly/software/#regexhibit
Feb 2nd