Murphy Randle

I’m a husband, a Web developer, a Mormon, and soon to be a dad!

Read this first

Vittles for Developing Node.js Apps in Docker

This is a quick draft. I don’t have much time to write tonight, but I wanted to make a note of these things:

I work with boot2docker on OS X currently. I decided to avoid the pain of NFS mounts / volumes etc that I would normally want to set up when developing an app within Docker, and instead just add my source every time (practical for teensy apps, not practical for big apps).

Whenever Docker builds an image, it uploads the entire contents of the folder that the Dockefile resides in from the client to the Docker daemon. This can get terribly slow if you have any significant number of packages in your node_modules directory.

Until this ticket is resolved: https://github.com/dotcloud/docker/issues/2224

Don’t keep the node_modules directory in your local folder. Maybe create a symlink to a directory outside of the source? I haven’t tried this yet. I don’t know if Docker follows...

Continue reading →


What on Earth, CSS?

Css can be a real bummer. But learning the specific rules helps.
Here’s a little trick to help with the nth-of-type selector:

Say you have markup that looks something like this (haml)

.wrapper
    .bob
    .entry
        one
    .entry
        two
    .entry
        three

It makes sense to me that: div.entry:nth-of-type(1) would select the div that says “one”. In reality, it won’t select anything, since .bob is the first child of .wapper (the parent of all of the divs). I won’t rehash the rules here, since Chris Coyier did such a smashing job with his blog post..

A trick to help this work in a more expected way is to wrap those .entrys into their own parent:

.wrapper
    .bob
    .entries
        .entry
            one
        .entry
            two
        .entry
            three

And then the div with “one” will be selected.

Continue reading →


Intermediate GNU Make Tutorial

When I was just starting to use GNU MAKE, I was frustrated out of my mind, trying to learn how to set up an efficient makefile for my small school project.

The tutorials I found were either basic, or too in-depth. I found no help for a novice user. Eventually, I dug into the manual and spent a number of hours figuring out how to do what I wanted. Then I made this video, which gives a few hints on how to do some automation in your makefile, without using crazy wizard magic.

** Disclaimer: **
Please remember that this is not a bullet proof solution. After all, a novice came up with it. Nevertheless it worked fine for my small school assignment.

View →