Brad's Blog

web dev, django, running, food, or whatever

A scenario for the future. 2012-08-27

Just jotting down a thought I had during my commute this morning... A large, multi-national corporation essentially has a monopoly on the seeds of a plant that's used as the world's major food source. It just so happens that they've also got a patent on a genetically modified version of this seed, which is the version of the seed that gets distributed to farmers.The corporation can detect their patented genes in any of the food grown ...

planning julython 2012-07-01

A few days ago I saw @jtauber tweet something about julython. Essentially it's a game that encourages you give a pet python project a little extra love during the month of July. For me (and probably several others), this is a little push to spend some time on projects that otherwise get neglected because there are more pressing things to do. So, without further ado, here's what I'd like to accomplish this month (in order of importance ...

Building a Happy Potty 2012-06-11

This past weekend, I particpated in Memphis's 48 Hour Launch. It's a weekend-long event where anyone can pitch a business or app idea on a Friday night, try to get enough people to buy into the idea, and form your team. Then, you spend the weekend building something, and on Sunday you get a chance to showcase what you've accomplished. I was fortunate enough to team up with a few friends (and some new ones!) to build ...

Easy Custom Vagrant Packages 2012-04-16

I've been using Vagrant quite a bit lately, and one of the nice things you can do with it is to define your own package. This makes it easy to share your VMs with others. It's also nice to have the same stuff installed on every VM that you create! So, here's how you create a package. To do this, you'll need to Install VirtualBox and Vagrant. (At the time of writing, I'm using VirtualBox ...

Running with Zombies. 2012-03-10

I picked up the Zombies, Run! app today, and I'm pretty excited about it. If you haven't heard about it, check out their video: I've only had one run with the game, but the story felt very well-done, and I really like how they've added an extra element of fun to my run. Of course, I'm a fan of all things "Zombie Apocalypse". If you do pick up a copy, spend some time setting up ...

Streaming Replication in PostgreSQL 9.1 2012-03-03

Not long ago, I set up synchronous, streaming replication in PostgreSQL 9.1 in order to build a Hot Standby system. This is the story of that journey. This post is mostly based on the 5-minute simple replication tutorial from the PostgreSQL wiki, but with a few modifications and clarifications. There's also lots of good information in the Streaming Replication wiki from the PostgreSQL wiki. For the remainder of this post, assume that you have a Master at 111 ...

Net::HTTPServerException: 412 "Precondition Failed" 2012-02-05

So, I've been working with Chef quite a bit, lately. Every once in a while, I'll bootstrap a new node and it fails with this: Net::HTTPServerException: 412 "Precondition Failed" Every single time this has happened to me, I've had stop and scratch my head. Why can't I remember what causes this!? Well, in my case it's usually a misspelled cookbook or recipe name. For example, I might have a role that looks something like ...

PostgreSQL 9.1.2 via homebrew on OS X 10.7.2 2011-12-22

I just picked up a snazzy new Macbook Air, and I'm working on setting up my development environment(s). For the most part this has been fairly easy. I pull in my repos from github and bitbucket, and I use virtualenv and pip to organize all my python packages (mostly installing from requirements files). Most of the other command-line tools get intalled with homebrew, and this time around I decided to install PostgreSQL with homebrew. I didn't keep ...

Chosen.js in the Django admin 2011-12-13

Update Nov 23, 2013: I've written a little app (django-chosenadmin) that'll automatically add this to every app. Quite some time ago, I ran across the chosen.js plugin for jQuery and Prototype (I'm using the jQuery flavor). My first thought upon seeing this was, "This would rock in Django's admin app." Yet for some reason, I didn't make that happen.Until recently. I maintain a project where about 10 people use the admin app extensively ...

Think Different. 2011-10-06

There's a lot of buzz on the net about Steve Job's death, and rightly so. For those of us that work in or around the tech world, he was a giant. I fully attribute his company's products (the iPhone and the iPad) to what I like to think of as a renaissance in computing. These devices have changed the way we think about computers, the web, and what software can be—mobile & fully integrated into our ...