I'm an experienced web developer, software engineer, and leader. Welcome to my blog. If you need to reach out you can continue the conversation with a tweet to @geedew. I hope you find what you are looking for here. You can also find me on Github and StackOverflow.

My must have grunt plugins of 2014

Over the course of the year, I’ve been tracking what Grunt plugins that I have enjoyed the most.

Time-Grunt
Time-Grunt plugin
Time adds really helpful charts to the grunt process to allow for a visual inspection of where things are being slowed down. The graphs keep a very clear indicator of what is taking up time in the grunt processes. When caching layers are involved, is tends to show off the difference as well.

/ / / Read More

Automating tasks based on file changes

Triggering scripts to run when a file or folders change is a common advanced task. Recent applications like Dropbox and BitSync have grown from the days of rsync magic, but what about triggering code when a sync occurs. It could be as simple as emailing a photo to your parents once 5 pictures are updated in Dropbox or as advanced as rebuilding a static blog based on content changes of configuration files in a folder. This post focuses on the Linux tool for handling these events that relies on inotify; but there are similar (not covered here) ways on BSD/OSX/Windows too (FSEvents/kqueue).

I ran into this when setting up a Dropbox sync to cause a Grunt process to build a stage server. The Dropbox sync would need to trigger an Assemble.io process to turn Yaml files (that are held in the Dropbox path) into HTML.

Inotify is the systems way to event filesystem changes, but to be able to tap into inotify events it’s easiest to install another daemon called incrond (inotify cron daemon) that abstracts inotify system calls in a manageable way.

/ / / Read More

Copying Files to a Vagrant VM from the Host

I ran into a case where I wanted to have a file that exists on my local also exist on a Vagrant VM. I didn’t need it to be shared; using a shared directory. I also couldn’t move the file to the Vagrantfile path and use the default mounted directory to move it. Instead, I needed a way to use scp to push a file from the host to the guest. Vagrant provides an API that is key to making scp work. With some piping and tools; providing the right credentials for scp is easy.

I also commented on StackOverflow

Quickly Remove a Known-Host Entry

I’ve had plenty of scenarios in development where I have updated a development machine and the credentials are updated causing SSH errors. This happens frequently in Vagrant as well. But it’s simple and quick to remove the old known signature.

When updating your known_hosts; make sure that you understand what you are doing. The known_hosts entries are there to protect you by cryptographically validating a server really is who they say they are. IE: Do Not Delete Things You Don’t Trust.

1
2
3
4
5
6
7
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is

The Case for Critical Assets

When it comes to first impressions, it can be said a website is made or broken by them. A modern website that relies heavily on scripting is likely self inflicting a performance hit. This hit can be caused by the generic advice given for speeding up a website, ironically. Many web speed tests give an immediate failing grade for not using a content delivery network (CDN) for every single one of your assets. But in the case of critical scripts and styles, this can be the exact wrong advice.

Critical scripts and style are the assets that must load prior to effectively loading content. For instance, a site might use Modernizr to sniff for features to further load content or other scripts. It might use jQuery to create DOM elements and place them on the page. It also might use @media queries to alter, import or change the layout of the page. If any of these situations exist, a new or returning user will have to wait for that file to load on the page prior to being able to view any content. I’m not going to argue if a site needs to be doing those things first, but if it is, then it’s going to cause a ‘hiccup’ for first time rendering. A cached asset may negate this on further loads and that’s why caching and cache control is a good thing to use. But this does nothing to help a first impression.

[caption id=”attachment_571” align=”aligncenter” width=”500”]DNS lookup times are killing time DNS lookups are killing time[/caption]

/ / / Read More