It's nearing the end of 2013 and I wanted to look back at some of the goals I set for myself this past year as well as reflect on some of the things that happened over the year.
One of the biggest change for me this past year was the increase in running. Running moved from being just excercise to a pastime. My goal for the year was to enter and run in 4 races. I ende up running 6 races. Not only did I run 2 more races than I thought I would, the composition of the races was quite different. Last year at this time I was planning on running my first half marathon along with 3 5k races. I ended up running three half marathons, one 10k, and two 5k races. For all of the races except one of the half marathons I set a personal record. To recap I participated in 6 races, went through two pairs of shoes, ran over 830 miles. It was a good year for running.
My work on buckit.io ended up faltering and eventually stopping over the past year. However, I have two new projects that I am currently working on. Emporium.io is a private package repository for python developers. While Verse is a frontend for blogging via github pages. Hopefully, I will have posts on both these projects in the near future.
The best thing to happen to me this year was the birth of my second daughter. She was born this summer and has been a joy to watch grow over the past 6 months. My oldest daughter turned two this year and it has been fun to watch her learn to use words to not only talk but to sing as well. Our family had some ups and downs, but it's been a wonderful year all around. I'm very excited to see what the future holds for us.
Coming up next, some plans for 2014.
I've been traveling over the past few weekends. One of the things that I always try to do before getting on the plane is download the sphinx docs of any projects I might be working with. One thing that I love about the static html sphinx build is that it includes a search feature. However, that search feature only works when running the docs from an http server. If you try and use search when opening the files directly, you will get an error that looks something like this
Origin null is not allowed by Access-Control-Allow-Origin.
A quick fix is to use the builtin http server that comes from python. It serves local files from whatever directory it is launched in. So go into the html folder of your docs build and run
python -m SimpleHTTPServer 8000. After that you should be able to see the docs by going to http://127.0.0.1:8000.
One caveat is that you have to change the port for each set of docs you might want to run at a given time.
Today I learned something new about custom headers, django and nginx.
We have an endpoint in our django app that uses custom headers to validate a request, ala Amazon AWS requests. Basically, the client creates a hash and sets a header with the value. Then on the server side, we validate that the hash is valid and continue on.
In development, everything was hunky dory. However, once we started testing in our staging environment, the headers were never getting to our django app. The only difference between the environments was the addition of nginx. After much hair pulling and grousing, we came upon this interesting configuration bit underscores_in_headers. It turns out that nginx will strip any headers it recieves that contain underscores, unless this flag is turned on.
Moral of the story, don't use headers with underscores or turn on the flag in nginx.
I recently switched the theme here in order to inspire myself to write more content. The only thing I was having issue with was getting code blocks to work correctly.
Below is a sample from the markdown reference:
require 'redcarpet' markdown = Redcarpet.new("Hello World!") puts markdown.to_html
Some python thrown in to see what it looks like
import stuff s = "Python syntax highlighting" print s
Instead of resolutions, I try to set some personal goals each year. Some years it works,
some years it doesn't. Last year I had 2 primary goals and I feel like I achieved each.
The first was to end the year weighing under 200 pounds for the first time since high school. I'm happy to report that as of yesterday morning I weight 184 lbs, so unless I somehow consumed a significant
amount of food while sleeping last night I met that goal. My second goal was to help organize
a local conference. It wasn't quite a conference, but I did help run the Nashville Hack Day, a
one day event where developers came together to hangout and share ideas.
I recently had some people ask questions about installing django
curl -O http://python-distribute.org/distribute_setup.py sudo python distribute_setup.py (optional) - you can remove distribute_setup.py
sudo easy_install pip
sudo pip install virtualenv
mkdir -p ~/envs cd ~/envs virtualenv --no-site-packages --distribute django-env source ~/envs/django-env/bin/activate
pip install django
create new django project
cd ~/ django-admin.py start project newproj