Temporary use of fast PRNG

rngd -f -r /dev/urandom This sends the output from the fast-but-not-very-random PRNG as input into /dev/random. Useful when testing and speed is more important than security.

How to get at request in a template

I needed to get at the request in a template which had been called ‘direct_to_template’. To make the request available, you need to modify the TEMPLATE_CONTEXT_PROCESSORS variable. Add this to your settings file <code> TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.request', ) </code> Then you can use {{ request }}

Why won't your browser install your cookie?

It seems that browser refuse to install cookies for a TLD. So for example, if your local network is .internal, then you won’t be able to set a domain in a cookie for .internal. Add another layer into the domain e.g. .level2.internal, and the cookie will work fine.

How to fix "ViewDoesNotExist at /admin/"

Common problem when migrating from 0.96 to 1.0… 1. Add "django.contrib.admin" to INSTALLED_APPS 2. Add "from django.contrib import admin" to urls.py 3. Add "admin.autodiscover()" in urls.py 4. Change line to (r'^admin/(.*)', admin.site.root), Link to relevant page in Django tutorial

OpenSSL / Apache links

How to create a self-signed certificate Apache’s mod_ssl HOWTO Van’s Apache SSL/TLS mini-HOWTO

How to add a zProperty in your ZenPack

Define it in the class in init.py in the ZenPack’s home directory. Ref: Section 3.4.1 “Base ZenPack Class” of the Zenoss Developers Guide. (V2.3)

How to add collectors to a device class

In the device class, go More>Collector Plugins; or go to the zProperties screen, then click the edit button next to the zCollectorPlugins field. To add a new collector, click the very faint “Add Fields” link and a box will pop up with all the available ones.