HAProxy: Routing by domain name
From:  jit.nuance9.com
Without too much effort I was able to find multiple search results that said HAProxy could direct traffic according to domain name. Unfortunately I was hard pressed to find any example configurations demonstrating that functionality. Turns out it is in section 7.7 of the documentation.If we wanted to direct traffic for foo.com and bar.com to different servers we could do so as follows:frontend http_proxy bind 192.168.0.1:80 acl is_foo hdr_dom(host) -i foo acl is_bar hdr_dom(host) -i bar ... Read Full Story
Tiny email sending service with Amazon SQS
From:  jit.nuance9.com
I found the "Dynamo Paper" by Amazon to be interesting. In particular I liked the idea of small services. Nothing new, but I liked the concept and wanted to play with it. The result was the 71 line SQS Mailer, available on Github.For this experiment the code polls an Amazon SQS queue. If there are messages in that queue, it retrieves them, parses them, and sends them out as emails via SMTP. If there are no messages waiting, it just sleeps for 5 seconds and tries again. So if you ran mul... Read Full Story
Do you spend significant time "off-hours" on tech projects?
From:  jit.nuance9.com
Do you spend significant time "off-hours" on tech projects?If so, are you driven by passion or fear of becoming irrelevant?Whether driven by passion or fear, does the amount of time involved negatively impact other areas of your life?Would be interested to hear what people think. Read Full Story
Abort: couldn't find mercurial libraries
From:  jit.nuance9.com
I've been setting up my fresh Snow Leopard installation today.I followed the guide from Hivelogic: Compiling Mercurial on Snow Leopard. The installation completed without issue and 'which hg' showed everything was in place.However, when I tried to issue an 'hg' command the following error popped up:"abort: couldn't find mercurial libraries"Google came to the rescue, and revealed these tweets:https://wincent.com/twitter/155https://wincent.com/twitter/156For Snow Leopard, I just needed:export ... Read Full Story
David vs United Airlines: An Internet Lesson
From:  blog.nuance9.com
If you have any doubt that the Internet changes the dynamics of "business as usual", take a moment to consider the case of Mr. Dave Carroll.According to his side of the story, while flying United Airlines his guitar was broken. After 1 year of frustrated attempts to receive compensation for his loss he was told "No".5 to 10 years ago that would have been the end of the story.Not so today.Dave Carroll told United Airlines that he was going to write 3 songs about the incident and produce video... Read Full Story
Typing? I'm a programmer not a secretary.
From:  jit.nuance9.com
This last week has seen a few posts on the necessity, or lack thereof, for good touch typing skills.We Are Typists First, Programmers Second - Jeff AtwoodIs Typing A Necessity For Programming? - Abhijit NadgoudaI originally was going to say something along the lines of "I think it depends on how you view programming."  I was then going to differentiate between whether you just view programming as a job (where you are looking to scrape by with minimum investment), or a skill/craft/ar... Read Full Story
Knowing Your Languages
From:  jit.nuance9.com
You may only speak one language, but how well do you know your tools?  There are likely many similarities between learning a language and learning the tools you use daily.Today I was thinking about the difference between someone who is just learning a spoken language and someone who knows it well, and how this may at times be seen by their knowledge of it's vocabulary.  For example, imagine someone explaining "I need a tool that you use to hit those little metal things that connect t... Read Full Story
Remove Gems By Prefix
From:  jit.nuance9.com
If you are working with Merb or DM you know that approximately a gazillion gems are involved.  When, for whatever reason, I want to remove them it is a pain to do by hand.Here is a simple script to help:#!/bin/bashprefix=$1gem list --local | grep $prefix  | awk '{ print $1 }' | xargs sudo gem uninstallI saved mine as remove_gem_by_prefix, gave it executable permissions and placed it in my path.Now I can issue the commands:$ remove_gem_by_prefix merbor $ remove_gem_by_prefix dmAnd they... Read Full Story
Git-O-Mator
From:  jit.nuance9.com
Inspired by Rein Henrichs Hack && Ship, I have created Git-O-Mator.Git-O-Mator is more name than these 2 simple scripts deserve, but what fun is naming small?Git-O-Mator can be found on GitHub, and contains the scripts new_repo and hack.  New_repoNew_repo was originally mentioned in the last blog post "Quick Remote Git Repository Creation Script", and has the syntax of:new_repo fooWhich will create a Git repository locally and on a remote host account that you configure.Hack... Read Full Story
Quick Remote Git Repository Creation Script
From:  jit.nuance9.com
If you are using Git for your source code management, GitHub is an awesome tool. It especially shines for public projects where you freely allow others to fork your code and possibly pull patches back in.Sometimes I'm just working on a project that I would prefer to keep in a private repository. GitHub provides paying accounts with such an option. However, I already have hosting accounts that are terribly underused. Here is a little script I use to create a remote git repository on on... Read Full Story