“Invert” a dict in python

If you have a list/tuple in python and you want to use the items in there to return an index of the position of the item, you can do so like this: a = (‘archive’, ‘audio’, ‘document’, ‘video’, ‘executable’, ‘image’, ‘misc’, ‘parity’) lookup = { v:k for k,v in enumerate(a) }

Warn your clients before disabling SSLv3 on Apache for POODLE

With POODLE, everyone is hurrying to disable SSLv3 on their webservers. However some sites still have clients that for whatever reason have not updated from XP / IE6 (it’s only been out 13 years, what’s the rush?) Instead of immediately locking them out you might like to give them a few days warning with some …

Continue reading ‘Warn your clients before disabling SSLv3 on Apache for POODLE’ »

Hitting a link in an HTML email in mutt

add macro attach V |’lynx -stdin’\n to .muttrc then when you are in the attachment menu, select the HTML content and hit V. This will launch a lynx process to view the content, follow links, etc. This is on top of having text/html ; lynx -dump -force_html %s ; copiousoutput or similar set in your …

Continue reading ‘Hitting a link in an HTML email in mutt’ »