Useful C Debug Macro

Tonight I took the plunge to get back into some more C coding. In getting my environment setup I came across a useful debugging macro. This macro will output the filename and line number every time it’s expanded. I wanted to make sure I understood how the macro was working before just copying and pasting it into my source code so I’ve broken it down below for myself and others to understand. »

justin

My Stay Puft Marshmallow Man Moment

A couple years ago I was sitting at a poker table for my final interview for a sys admin position with . It had been a long day of mentally exhausting questions, and the interview was coming to a close. The person I was interviewing with sat for a moment and pondered his next question for me. “You’ve got a building across the street with a bunch of data on a server. »

justin

Determining my most used focal length in photos with python and dcraw

For the holidays I got a new Canon 7D camera. I’ve been saving quite a few amazon gift cards over the last year that I was previously planning on using towards purchasing the camera but thankfully Santa delivered me one. My current lens collection consists of 10-22mm f/3.5-4.5 70-200mm f/4 50mm f/1.8 18-55mm f/3.5-5.6 (kit lens) The lens collection has been built over the last 4 years from when I first got my Canon Rebel XT and I’ve been fairly happy with them thus far. »

justin

Python pip on Ubuntu Lucid Lynx

Lately I’ve been reading up on Django a bit in an effort to get back into programming. It seems the preferred way of running Django is inside a virtualenv environment. I try to stick to packages when possible for installing applications and saw that the python-virtualenv package wasn’t too far behind at version 1.4.5, where the latest is at 1.5.1. This appeared at first to suit me just fine until I discovered the version of pip that gets installed along with python-virtualenv is at 0. »

justin

Configuring Varnish

At $WORK I’m currently working on deploying a pool of Varnish servers to sit in front of some Apache servers running Pressflow. On our current infrastructure we’ve been running Squid for the past few years with very good success , minus a hiccup or two along the way, one involving memory fragmentation (thank you tcmalloc). Varnish has a few nice features that Squid lacks. The ability to PURGE objects using wildcards Better support for multiple processors (Squid can benefit from multi procs when using AUFS) Grace period that can be configured to serve objects from the cache after they’ve expired while fetching the new content from the backend. »

justin