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.

Working with Ansible

I think that the year 2013 could be remembered by most web developers as the year “DevOps” became a vital part of the workflow. From the growth that dev tools like Vagrant and Docker have seen (Docker wasn’t around before 2013) it’s sometimes hard to keep up with all of the scuttlebutt.

Ansible follows in line with it’s two closest competitors, Puppet and Chef. It fills the role to scientifically create the server/software layer your code is written against. A well written Ansible task will move a server from nothing to a fully working, ready to use process that can be repeated without differences.

/ / / Read More

Password-less, Secure Server Login with SSH Keys

SSH keys should be your standard, go-to for interacting with any remote server. They remove the need to memorize a server password. They allow you to login programmatically, and they give your local operating system the chance to handle the caching of your password in your keychain. It’s also very simple.

A few rules you should always follow.

  • Always make a passphrase.
  • Don’t use the same SSH key on multiple important servers.
  • Don’t share the private key.

    / / / Read More

Cross-Console for Better Logging in JavaScript

During web app development, there is little reason to need to handle a cross-browser console interface. In fact, most users today will have no issue if something does get sent to a console while they are browsing (where in the past it could be a JavaScript error event). Unfortunately, when working on a team or in an unfamiliar browser, sometimes sending something to the console while debugging is useful but never gets cleaned up (but in reality you should be debugging with [breakpoints](http://stackoverflow.com/search?q=how+to+set+breakpoint+javascript)). Proper code-review prior to a using code in a production scenario should catch the mistake, but it’s smart to always have that automated backup to protect the code. A quick, robust script will give you full control and blockage of any wild console as well as give you some flexibility to control the console easier using environments and modes.

TL;DR; View it on Github Pages or View it on GitHub

Console Log being Controlled

/ / / Read More

A syntax theme that serves a purpose in SublimeText/TextMate

I spend much of my time writing and reading a variety of code in text editors. Eye fatigue is something that I struggle with due to my habits. I’ve come to understand that colors and visual syntax ‘brought to life’ with the right tweaks relieves the eye strain. Yet for some reason, I’ve never found a good color palette syntax that does what I need it to do and does it well ( a big shout-out to tmTheme-Editor, absolutely brilliant ). I wanted something that is functional and relieving on my eyes. I use SublimeText as my editor (with vim bindings), but my theme can be applied to just about any editor that supports tweaking the syntax highlighting (_Sh_). My theme is a standard TextMate theming standard compliant theme. I’m sure it could be adapted for other editors too (please fork it!) .

[caption id=”attachment_429” align=”aligncenter” width=”545”]Downed Rainbow code syntax highlighting example Downed Rainbow code syntax highlighting example[/caption]

If you’ve seen enough, you can just go to Github now and get the theme! Or read on.

/ / / Read More

Using GruntJS to sync with Amazon's S3

S3 continues as a great place to host static files for web use. It’s relatively cheap, has a good uptime and when integrated with Cloudfront it becomes a full content delivery network (CDN) with many geo-located edge servers. Getting development files to S3 and what to do once they are there makes for a long day and should never be manual process. I have a setup that I use on personal projects and at work that solves a majority of the problems ever faced with using S3 in development for static cached files. Previously I was using bash-fu or Phing for this, but recently switched to NodeJS.

A quick example config for uploading files to S3 in Grunt

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cfg['s3'] = {
options: {
key: cfg.Ss.s3.key,
secret: cfg.Ss.s3.secret,
bucket: cfg.Ss.s3.bucket,
access: 'public-read',
headers: {
// Two Year cache policy (1000 * 60 * 60 * 24 * 730)
'Cache-Control': 'max-age=630720000, public',
'Expires': new Date(Date.now() + 63072000000).toUTCString()
}
},
prod: {
sync: [{
// The regular js files
src: path.join(cfg.Ss.path.release, 'build/cdn/js/**/*.js'),
dest: 'js',
rel: path.join(cfg.Ss.path.release, 'build/cdn/js')
}, {
// The gzip js files
src: path.join(cfg.Ss.path.release, 'build/cdn/js/**/*.js'),
dest: 'jsgz',
rel: path.join(cfg.Ss.path.release, 'build/cdn/js'),
options: { gzip: true }
}, {
// The regular css files
src: path.join(cfg.Ss.path.release, 'build/cdn/css/**/*.css'),
dest: 'css',
rel: path.join(cfg.Ss.path.release, 'build/cdn/css')
}, {
// The gzip css files
src: path.join(cfg.Ss.path.release, 'build/cdn/css/**/*.css'),
dest: 'cssgz',
rel: path.join(cfg.Ss.path.release, 'build/cdn/css'),
options: { gzip: true }
} ]
}
};

/ / / Read More