Rain Math

published on 2012-09-30 in nashville , science

The storm headed our way tonight is predicted to drop 2" of rain over Nashville. If it covers the entire 527 square miles with that amount (on average), that storm would drop 152.8 billion pounds of water. Yay science.


Here's my math:

1 inch of rain x 1 square mile = 65,785 cubic meters = 17,378,742 gallons

Nashville is 527 square miles according to Wikipedia.

A gallon of water weighs 8.35 lb.

So, 2 inches of rain over every inch of Nashville is 2 x 527 x 17,378,742 ....

Which is 18,317,194,068 gallons. Which weighs = 152,948,570,467 lb.

Yikes. I better go start mowing the yard like right now. I don't want to get killed when the rain falls on me

git + sudo + local ssh keys

published on 2012-05-08 in computing

Some colleagues and I wanted to be able to check out code onto a remote server using our local github ssh keys. And we should be able to do that as any user we please (for example, the deploy user). After a bit of research, I found that it's possible! In short, you use ssh-agent to pass your key credentials on to the remote server and set up sudo to pass those credentials along thru the environments. Let's do this!

I'm on a Mac, which has ssh-agent running by default. Yay! But, you still want to verify that your key is added to the agent:

laptop:~ n8foo$ ssh-add -l
2048 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/Users/n8foo/.ssh/id_rsa (RSA)

Now, ssh into your remote server using the -A flag to ssh to pass auth along.

ssh -A remoteuser@remote.server.com

Test that ssh's agent auth worked:

[remoteuser@remote ~]$ ssh-add -l
2048 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/Users/n8foo/.ssh/id_rsa (RSA)

Your keys should show up. Now, confirm that you can access github with your key from that remote server:

[remoteuser@remote ~]$ ssh -T git@github.com

Hi n8foo! You've successfully authenticated, but GitHub does not provide shell access.

OK, now let's enable this so we can switch users with sudo. Sudo needs to pass the SSH_AUTH_SOCK environment variable on through. To do that, add (or modify) the defaults line in /etc/sudoers to look something like this:

Defaults env_keep+=SSH_AUTH_SOCK

You can do this, if you have a default ubuntu sudo config:

# sed -i "s/^Defaults.*/Defaults env_keep+=SSH_AUTH_SOCK/g"

Everything should be working now. Let's test...

[remoteuser@remote ~]$ sudo su - someotheruser
[someotheruser@remote ~]$ ssh -T git@github.com

Hi n8foo! You've successfully authenticated, but GitHub does not provide shell access.

You can now get your git on, directly on your remote machine, as another user. Done!

BCN11 Wrap-Up

published on 2011-10-16 in nashville

My Space Balloon presentation at BarCamp Nashville went well. I normally would 'wing' a BarCamp talk, showing only the pics/video or show-n-tell. But I realized earlier in the week that I had a lot to cover and only 35 minutes to complete it. I figured some organization of my material might be in order. So, those of you that were there got to witness my first ever keynote presentation. Woo hoo!

I had a number of people tell me that they missed it, due to collision with blocked-off roads from a footrace that morning or the 9AM timeslot. So, here is the presentation in PDF format, with movies removed:  Space Balloon BCN11 Presentation. If you want to see the movies, they are linked on my blog here.


One other really cool thing that happened yesterday during the talk was Nick Navatta drawing a graphic of the presentation. Seriously cool. He even let me keep the end result, which I shot and put up on flickr.

Here is the full pic:

Space Balloon Presentation Graphic by Nick Navatta

Nashville Amazon Web Services User Group

published on 2011-09-15 in nashville , computing

A few of us are putting together a local Amazon Web Services User Group here in Nashville. The initial idea is to follow a format similar to Portland's AWSUG. Invite local experts, give talks, get together and share stories, etc. Maybe host a yearly event in Nashville, not sure. These are all just ideas at the moment. AWS's most game-changing (and also complex) product is EC2 and I'm guessing that will garner a lot of interest. That's also my area of expertise and interest.

Scheduled for Wednesday, Sept 28th (2 weeks from yesterday), the first meet up would be an informal get together to come up with a simple charter, brainstorm on activities, come up with a list of potential venues and sketch out a general calendar for the next quarter. I figure this can be accomplished after work, across a table of drinks. Yeah?

If you'd like to join....we'll be at the Corsair Taproom from 6pm till about 8pm.

Nashville Amazon Web Services User Group (NAWSUG)
Initial Planning Meeting - Informal w/beer
Sept 28th 2011, 6pm-8pm at the Corsair Taproom

Corsair Taproom Location:
1200 Clinton Street #110
Nashville, TN 37203
Map Link

BarCamp 0b10

published on 2011-09-13 in nashville

There's been a flurry of activity in Nashville about Bar Camp over the last 48 hours...and 5 years. I won't summarize because it removes the passion. If you care, go read them (referenced at the bottom).

So what do we (the Nashville community) do about it. Well, we act. Earlier today Tim Moses posted this:

I think there is room for an alternate BarCamp that answers your concerns without conflicting with the current BarCamp. BCN may not be true BarCamp format, but it is successful. It may not be tech-heavy, but that seems to be improving in large part by the BCN organizers. Making dramatic changes to BCN would most likely hurt it more than help.

The problem isn't with the existence of BCN or how it operates, but the nonexistence of a tech-focused BarCamp. Many BCN supporters have repeatedly suggested an alternate, but no one has stepped up to do it.

On that note, Nathan Hubbard (ex-Telalinker with true BarCamp experience), and I are organizing BarCamp 0b10, a tech-focused, 2 day, traditional BarCamp to complement BCN. The current plan is to space it far enough from BCN (maybe Spring) to not force a choice between the two. If you like both, go to both, present at both. If not, pick your BarCamp of choice.

We're shooting for a date sometime this spring and looking to things like this and people like this for inspiration and guidance. Initial thoughts are: traditional BarCamp, 2 days (camping!), complimentary to BCN, 'tech focused' but not tech only, simpler and less complex, less organized, etc. Tim and I will announce more via this blog and our twitter accounts (@timmoses, @n8foo) in the next few months. Keep your eyes peeled. Update: we have a new twitter account: @BarCamp0b10 and hashtag #0b10.

Right now, the Nashville community needs to focus on making BarCamp Nashville 2011 awesome. Go sign up. Go to make a difference. Go to see what it's like if you've never been. Don't wait on our event, go act.

Inspirational Lunch


  1. Nashville Scene: BarCampNashville Descends Into Online BarFightNashville
  2. Chris Wage: The Not-So-Great Barcamp Schism
  3. Matt George: Clarification on BCN comments
  4. Twitter: BCN_Critic
  5. Countless posts on twitter by the Nashville BCN crew and other tech heavyweights.
  6. Bar Camp Nashville
  7. The Rules of BarCamp
  8. BarCampSD

Space Balloon Post Launch Wrapup

published on 2011-09-12 in photography , science , video


the blackness of space at 100,000
The image above is a picture taken at 102,000 feet over Nashville back in April, from our Space Balloon.

Yep, the balloon launch back in April was a success. As was the presentation that Marc, Jared and I did at Emma Talent Night. It was actually far better than I could have imagined. We kept the whole project a secret right up until the night of the show. For weeks, people were watching us tossing parachutes out windows and messing with flashing lights and cameras. It really built up some great suspense. By the time the night finally arrived for the big reveal of our 'talent', the audience was actually chanting "SPACE! SPACE! SPACE! SPACE!". It was epic, really, for a bunch of nerds to get up and talk about sending a balloon to space in the middle of 2 dozen other awesome music, singing, magic and other acts. And get cheered at during the process. While drinking. Truly one of the most awesome things I've ever done.

Enough gushing, down to the data.

This data was recorded by our flight computer, an on board micro Arduino with 2 different sets of 1-Wire temp and barometric sensors and a 3-way gyro.

Avg ascent rate: 4.89 m/s (10.9 mph)
Avg ascent rate first hour: 2.32 m/s (5.19 mph)
min temperature : -59.116 F
max altitude : 102,496 ft (19.4 mi)
min air pressure : 930pa (0.93% surface)
max descent rate : 245 mph

-59 F! Wooo wee that's cold! The 245 mph speed was with the chute open! See, the air is so thin up there that even with the chute open it was screaming towards earth. At more reasonable altitudes, it slowed down to a more lazy pace of 15 mph. The height we achieved was 102.5K feet. That's almost 20 miles! One of our other calculations shows 106k feet so it was in that range somewhere.

On to the videos and pictures:

This is what we showed at the talent show after we got up and gave our talk about the balloon, more of a quick documentary of the process. It always makes me laugh watching our first two parachute drop tests. Especially on the second one when Pamela laughs at us. Music courtesy of 84001 (my co-worker Jimmy's band).

This is the music video I put together for [84001](http://84001.tumblr.com/), to be shown while they played live music on stage. It's various trippy time lapse and spacey stuff and about 10 minutes of balloon footage that starts around the 2:20 mark and the burst occurs at around 7:10...the music in this video is basically the same set they played live. The 3 cameras in the balloon filmed a total of 8GB of data across 3.5 hours, of which you are seeing less than 2% here:

More pictures, on Flickr with some video as well:http://www.flickr.com/photos/n8foo/sets/72157625894886863/
The actual slideshow, complete with graphs and stuff, from the Presenation: http://www.youtube.com/watch?v=R_aiON0-2J8

Thanks to Marc and Jared for making this a super kick ass fun science project. I can't wait for the next one. :-)

tcpdump web traffic

published on 2011-07-12 in computing

Want to tcpdump your web traffic for debugging? Here's the formula I've been using lately:

tcpdump -s 1514 -Ai en0 'tcp port 80 and tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420'

Reddit Traffic

published on 2011-02-23 in computing

This is what it looks like when someone posts a link to your blog on reddit (linux subreddit). I went from 48 visits the previous day to 581 visits the day of the reddit post. More than an order of magnitude more visitors. I don't give a s**t about visitor count but as a graph and chart nerd, it's neat to see in the google analytics.

Side note: great discussion on reddit. I will be making a followup article about pgp + vim, since that seems pretty slick. The jury is still out on which is a better solution for me.

encrypted password vault with Vim + openssl

published on 2011-02-21 in computing

In a post last year, DIY Encrypted Password Vault, I showed a simple way to use OpenSSL to create encrypted text files. Since I'd need to de-crypt those files to edit them (usually with Vim) there would be an unencrypted temp file sitting around while I was editing. And using a filesystem with history meant they were around for a long time. BAD. Surely there is a better way...

Can we encrypt directly with Vim? Actually, yes...Vim has encryption built in (via the -x flag)...it works and it's simple. Problem is that it uses 'crypt', which is not terribly hard to break. Also, it leaves a cleartext .tmp file around while you're editing it. Which means it's worthless to me for a password safe.

Enter the VIM openssl plugin. This plugin will allow you to write files with particular extensions corresponding to the type of encryption you desire (ex: ..des3 .aes .bf .bfa .idea .cast .rc2 .rc4 .rc5) and it turns off the swap file and .viminfo log, leaving no tmp files around. Excellent!  Here's typical usage:

Edit a new file with the .bfa extension:

$ vi test.bfa

Add your secrets and save it out. It will prompt you for a password (twice) to encrypt against.

blah blah blah : secrets of the world  
enter bf-cbc encryption password:  
Verifying - enter bf-cbc encryption password:

You can look at the data in the file to see the encrypted content:

$ cat test.bfa  

To re-open a previously encrypted file, just open it with vi. The plugin automatically recognizes the extension and prompts for your password:

"test.bfa" 2L, 78C

enter bf-cbc decryption password:

Pretty slick! You'll need the openssl binary in your path for this to work, which is pretty standard these days. Here is a little script that I run to set this up on my various home directories:

#! /bin/sh

test -d ~/.vim || mkdir ~/.vim/  
test -d ~/.vim/plugin || mkdir ~/.vim/plugin  
curl "http://www.vim.org/scripts/download_script.php?src_id=8564"
> ~/.vim/plugin/openssl.vim

Edit: 2010+ versions of Vim have blowfish support. Excellent, forward progress! I'm probably not going to upgrade Vim on my Mac and all my servers just for this when a plugin can work. Good to see progress but for now, this makes the most sense for me.

Space Balloon One

published on 2011-02-12 in science

My friend Marc and I started doing research on what it would take to send a balloon to 'near space'.  We've been inspired by a few others, most recently the father-son team from the UK that sent an iPhone up to 100,000 feet. We think we can build this for under $200, probably less.

Things we know:

  • 4 lb or larger payload requires FAA approval
  • GPS ceiling limit is 11 miles
  • Temps are -70F
  • Winds are 150MPH
  • good chance of a water/wet landing
  • single balloon

The first launch will be to test the concepts and recovery mechanism. We have planned to use the instamapper service in combination with a t-mobile phone for ground tracking. We have a camera that would do the trick for the image capturing, using CHDK. Our friend has donated a cryogenic styrofoam box that should help with insulation and we can use hot-packs to keep it warm in there. Need some sort of LED light to help us in recovery after dusk.

We're also considering building a small data tracking device, for recording temperature, light and pressure. Maybe some other environmentals, not sure. Probably arduino powered, since that seems pretty easy and cheap.

Questions we have right now:

  • how do we track it over 11 miles?
  • what kind of balloon do I use?
  • how do we deploy the parachute?
  • what are we missing?

Would love to see some comments by fellow space nerds.