Good-bye WordPress, Good-bye Linux

I am migrating away from a Linux/WP OpenVZ VPS to an OpenBSD/KVM VPS for hosting my website and other data. Please excuse the dust and broken links while I figure out Pelican. I will probably write more notes here related to OpenBSD, PF, IPSec, Python, and pet projects …

Continue reading »

Facebook Knox and yelling at your JBODs

I wonder if the Facebook storage engineers developing Knox know about this?

Pro Tip: Don't yell at your storage or it will eat your expectect performance for lunch.

Continue reading »

Script snippets

I recently needed to trim the last N characters from a string in shell. I wrote this little function to handle it.
This requires a newer distro that has updated coreutils that includes the 'fold' command (Feb 2010).

#!/bin/bash  
function trimChars() {  
    if [ $2 ]; then  
        TRIM_LAST=$2  
    elif ! [ $2 …

Continue reading »

Debugging python...

To debug a specific python script, start by inserting the following in to your .py file:

import pdb; pdb.set_trace()

These commands allow you to step through the code from the point of where pdb.set_trace() is placed in your script.

p \<object> - print the content of an …

Continue reading »

Merge lists in to dictionary based on key in Python

i've been learning bits of python here and there for work and for play and I came across a simple solution to a simple problem I had to solve in python.
There are some things in python that once you realize how things work you think "that is so simple …

Continue reading »