Deploying a web application is always kind of a scary process.  I feel like even when it works well, there’s a second where I wonder if it’s going to break.  Deploying a web application manually is probably where this irrational fear comes from.  Now that automatic deployments are the norm, there’s no reason to be scared anymore.

Capistrano is a standard for automatic deployments.  It’s been around for a while now, it’s a mature product, and it works really well.  There’s good documentation available, and honestly, it’s never really given me any problems.  Capistrano is also written in Ruby.  Unfortunately, I don’t program in Ruby (nor do I want to), so I’ve never really felt comfortable setting up and configuring Capistrano.  Not to mention that I feel a little dirty having Ruby code in my beautiful node codebase.

When I heard about ShipIt though, I got really excited.  I could have automatic deployments with a tool written in Javascript?!  Count me in!  I installed it, started configuring it into my Koa Starter Kit, and wrote this blog to document my progress.

Continue reading

I recently got tasked to document some databases for a project I’m working on.  I happen to enjoy writing documentation, so I thought it would be no big deal.  How wrong I was.  There’s so many tables, and all of them are filled with columns that lack comments.  It’s my job to find out what all of them do, and document them.  My initial thought was to create a markdown document and capture all of the data in some tables.  As I started to do that, I was really pleased with the result.  Beautifully rendered tables that accurately describe what column does what, how it’s formatted, and why we need it.

Unfortunately, my extremely manual documentation process doesn’t scale.  When I realized that several tables all share the same column name, I started to wonder “what happens if I make a typo and then copy and paste it everywhere throughout my documentation?”.  I started to think of ways to centralize the content, while still being able to keep my content in markdown.  The solution I came up with was Mustache and Grunt.

Continue reading

So I use the wonderful Atom to do all of my coding.  It’s free, and open source, so if you haven’t looked into it, you definitely should.

Anyway, one of the issues I’m constantly running into is that I want to open an entire folder with Atom, and have the folder show up in Atom’s project explorer.  Typically, I open up terminal, cd to the appropriate directory, and type  atom . to open up my entire project.  I messed around with Services a little bit and wrote a service that lets me right click on a folder to open the entire folder in Atom.  If you want to skip the tutorial and just download the service, check it out on Github:

Mac Developer Services

    1. Open up “Automator” on your Mac, create a new document, and choose “Service” for the type.
    2. In the top part of the right pane, choose “files or folders” next to “Service receives selected” and “” to the right of that.automator-service-1
    3. In the “Actions” panel on the left side, type “open” to search for all actions that start with “open”.  The action you want is called “Open Finder Items”.
    4. Drag the “Open Finder Items” action to the right side and drop it in the blank workflow section.automator-service-3
    5. Under “Open with” choose “” (or or whatever text editor you use).automator-service-4
    6. Save your service and run it to install.
    7. Right click on a folder to open it in Atom.



That’s all it takes to build an Automator service to launch an application from finder.  Let me know if you have any feedback, or suggestions.

As I started to implement the roguelike sprites I talked about earlier into a map editor, I realized CSS sprites might be a good idea.  I was previously using a split up set of PNGs that I exported from unity, and for a variety of reasons that stopped being a viable solution.

I tweaked the JSON data generation script slightly to have it make a CSS file too.  Enjoy!

CSS File


Kenney makes absolutely amazing art, but one of my wishes for a while now was that he would make a roguelike sprite sheet.  Well, he’s released a new donation pack, and it comes with an amazing 2125 sprites for a top down 2D roguelike! Roguelike Preview

Unfortunately, this sprite sheet doesn’t come with a data file (XML or JSON), which makes it difficult to use in some game engines.  I took some code that I previously wrote for my Texture Atlas Converter and hacked it up to generate a JSON data file for this amazing sprite sheet.

The code is a little rough, but it gets the job done.

JSON Data File

PHP Code: