Emergency Burgers

Nearing the end of the day, my wife called to say she wasn’t feeling well and wanted to have me be in charge of dinner.

Probably the most important part of this is the soy sauce. It imparts some mysterious flavor that makes these things disappear faster than a Republican spine.

Burgers (Measurements are whatever you felt like)

  • 80/20 meat
  • soy sauce
  • bread crumbs
  • onion powder
  • salt
  • pepper

Once everything was mixed up well enough, form balls about the size of billiards. Get a sheet of parchment or tinfoil (heavy duty is best) large enough to fold over as we’ll be smashing the burgers with a plate. This way make for less mess on everything.

With everything flattened, put burgers into a ripping hot cast iron skillet and cook to desired doneness. If you don’t do and caramelized onions, just put about a quarter sized drop of oil (grape, olive, whatever) spread out with a paper towel or a pad of butter. This is mostly just to help keep the first burgers from sticking.



I had a really good time meeting some new faces and some I had known of but hadn’t chatted with before. One gent, Cory Dingels, let me watch over his shoulder and showed me some nifty things about rails a while as he worked on the Yellow Bike tracking site.

Being the renegade that I am, I struck out on my own to pursue a dream, a dream of encrypted email storage. This idea started months (years?) ago when I read about how Lavabit’s innards worked. While certainly an impressive feat, it left something to be desired in terms of how secure the emails actually were. Since then though, protonmail has launched and they claim to do what I had envisioned and then some.

But what if you wanted to run your own mail services?

Since I was working alone, I figured the best way to make something that worked by the end of the weekend would be to simply have emails be encrypted and then forwarded on to an existing account somewhere else. Easy peasy right? It was…except for my really bad mistake which took me a good chunk of Saturday to figure out. Getting Haraka up and running was simple enough. Wiring openpgp.js and other modules to make the job easier was a breaze. (mailcomposer made composing emails super easy as I hate having to concat strings myself.)

The mistake was sending off just the encrypted message without any sort of headers. Google doesn’t like messages sent like that. Once that was corrected, my logs were less error-y and messages were showing up where they were suppose to.

While I’m sure the code will be found wanting, I’m pretty proud that it was working before the final check-in. (Full disclosure, gmail placed the emails I had the audience send into the spam folder so the demonstration part of the presentation failed.)

You can check out the code which is hosted on github at https://github.com/snoj/haraka-secwrap/releases/tag/v1.

Hoxy Proxy

Ever wish you could shim into and do some testing on a “live” site? Hoxy is for you! It now even supports HTTPS sites thanks to a couple awesome coders Greg Reimer (founder), Francois Ward, and yours truly. A special thanks to Seth Holladay for helping move the issue forward with his bounty!

Over-thinking #3: Restarting a node.js process

Sure, you could use something like forever but what if you want things as self contained as possible?

It’s very ugly and breaks stdio, but it works!

var cluster = require('cluster');
var _ = require('underscore');
var spawn = require('child_process').spawn;
if(cluster.isMaster) {
  //var cluster_args = 
  var runningragnarok = false;
  var msghandler = function(msg) {
    if(msg === 'rebirth') {
      _.each(cluster.workers, function(v) {
    if(msg === 'ragnarok' && runningragnarok === false) {
      runningragnarok = true;
      var nargs = process.argv;
      nargs.splice.apply(nargs, [1, 0].concat(process.execArgv));
      if(!_.contains(process.argv, '--regnarok')) {
      _.each(cluster.workers, function(w) { w.kill(); });
      spawn(nargs[0], nargs.slice(1), {detached: true, stdio: ['ignore', 'ignore', 'ignore']});

    if(msg === 'heatdeath') {

  cluster.on('exit', function() { if(runningragnarok) return; cluster.fork().on('message', msghandler); });

  setTimeout(function() {
    _.each([1,2,3,4,5], function() {
      var f = cluster.fork()
      f.on('message', msghandler);
  }, 5000);
  //_.find(process.argv, function(v, i, a) { return i > 0 && a[i-1] === '--ragnarok'; }) || 5000

Over-thinking #2: Javascript inheritance

As with all things, I was in need of a solution. The problem was that multiple object prototypes were needing to be mixed together into one. No npm package I found seemed to do the trick for me in the way I wanted and needed things to work. So of course I reinvented the wheel and made multiinherits.

The main reason for this is that I wanted a way to specify what super constructor to call.

Over-thinking #1: Node.js HTTP requests

Something I’ve been toying with is a tip and trick, but mostly horrible hacking away and over-thinking things blog series highlighting the stupid things I do. These things will likely come from stuff for my work or simply curiosity.

Without further ado, here’s #1.

A couple a weeks ago, I needed to migrate a web server and test the sites before going live. Due to a variety of constraints, editing the hosts file, using something like DNShifter or editing the hostname for the vhosts was out of the question. What is a guy to do? Thinking over the problem I figured node.js would be the quickest route to write a testing routine with.

The first problem and probably the biggest was to construct the http request in such a way that I would connect to a different host than the hostname would otherwise send me to. Looking at the node.js code on github made me think it was going to be a piece of cake, just a couple additions to the /lib http files would allow me to specify the actual host to connect with.

//around /lib/http.js:1425
else if(options.connection) {

This allowed me to use a specific socket made by net.createConnection. However, this is clunky and I’d have to maintain a copy of the mainline http with this and all the other necessary code changes. Obviously this is more work in the long run and my future self is lazy.

Thankfully the folks who wrote the http module decided to check if the options object for http.request() has “createConnection” defined and then uses that to initiate the TCP stream. This makes the task so much easier and should work for the foreseeable future.

var url = require().parse("http://example.com/");
url.createConnection = require('net').createConnection.bind(null, 80, "snoj.us");
require('http').request(url, function(res) {
  res.on('data', function (chunk) {
    console.log('BODY: ' + chunk);

And of course since drafting all this drivel I find that wget (starting with 1.10), Invoke-WebRequest, and node.js allow the Host header to be specified and each works excellently. However, I still like this technique as it allows you to leave the original URL in place while forcing a connection to another server. Using custom headers means editing the URL which may or may not be doable in some situations and calls for more code changes to accomplish the same end.

What’s the motto with you?

Last year during a men’s retreat weekend my church put on, we men were challenged to come up with a “Family Charter”,  a document of rules and regulations concerning interpersonal interactions. You could look at it as something akin to The Constitution for Minnesota, the U.S.A or any organization. Though I’m not too keen on having a charter for several reasons that are another post, one thing did stick out to me, the family motto.

So I started digging into my family background to see if there was anything I could revive or use for inspiration. thus far, I’ve only come across one I might have claim to.

From the old maternal side I found, “Nil sine numine” or “Nothing without God”. Quite spine tingling if you ask me, invoking the idea that nothing is possible without God’s hand or blessing and reminding us of his sovereignty.

As far as I am aware, my paternal family descends from common farming folk. I’ll have to dig around more on that side.

The Bond family has a neat one as well, “The world is not enough” (“Orbis non sufficit”). Which is an actual family and crest. I had always assumed it was the realm of fiction. At any rate, I had thought it a motto with gravitas, proclaiming that there is something better, something that this world cannot satisfy. Or perhaps, the price required to “buy one off” would be more than the world.

Other ideas being toyed with:

  • To the sky/ad caelum
  • Seek the Lord/Quaerite Dominum
  • With strength, comes peace/cum virtute, fit cum pace

ref: http://en.wikipedia.org/wiki/List_of_Latin_phrases_(full)

Josh: Nerd in the country

It’s getting official, we’re moving to the country. It’s something that the mrs and I have been thinking of doing, mostly in a “sometime-in-the-future” way, several years from now and the earliest.

Then earlier this year we found ourselves a piece of land for sale about 20-30 minutes away from our current home that we could not say no to. (Intra-family deal.) Now after a month or so of unknown timelines, we have some concrete dates for moving. Which do not easily jive with other dates like when newbie is coming or snow melting. I hate moving with snow on the ground.

Why move to the country? Won’t I miss the high-speed internet offerings? Well, yes, I will. 30Mb+ internet down speed is really, really nice, but there are some other reasons I’ve had my eye on the country side.

During my childhood, we’d go visit relatives in California for a week or a month at a time. I loved the time there with my cousins and just being in California. There were several reasons we were able to do this, one of which was that my Aunt and Uncle had a large enough house that we could comfortably stay with them. To be able to do the same thing for my friends and family is something I’ve wanted to do as well.

We’ve wanted to have a garden for a couple years, but our home so far have either been rentals and the land lords prohibited it or the lot was too small. Though our last lot probably could have had a small one if we did some terracing. Our (well more my goal) is to eventually have the garden offset store bought veggies to such a degree that we’re only buying if much spoils or we’re needing extra for a feast.

There’s a chicken coup that we’re hoping to make use this summer. Our little family can go though a couple dozen eggs a week easily when only accounting for breakfast. So even just over a half dozen chickens should keep up with our weekly demand for eggs. Meat though is another matter. Thinking of all the times we have just chicken breast, wings, or legs, we’d have to have a lot of chickens to satisfy that want.

I love a good fire with friends on a brisk fall night or the warm glow of a fireplace. While we have “room” at our current digs, I’m looking forward to the additional space to have a pit instead of a portable steel bowl. We’re also looking at using wood to offset fuel oil use down the road. This will mean a lot of wood chopping.

It melts the heart

Over the last couple months, my little flower and overflow have started waking up when I get up for work. Following me downstairs and starting to play or demanding to watch Kipper before mom comes down and turns it off.

However this week has been slightly different. The little flower has started saying “Daddy no work, stay home!” I’m almost tearing up right now thinking about it.

I love being a dad.