"Pay no attention to the man in the corner whispering sweet nothings to himself..."
  • September 4, 2014

    quicktip: postgresql + ubuntu = setup fun!

    A short while back I finally bit the bullet and dropped Windows in favor of Ubuntu. IMO, one of the best decisions of my coding existence. But that’s besides the point, today I’m going to talk about setting up PostgreSQL on Ubuntu.

    This process may seem daunting at first but it’s really not. What it is is a good exercise in learning your system. So let’s begin by installing PostgreSQL:

    Read More

  • August 4, 2013

    Pressing . (period) while in Normal mode with vim repeats the last command used in that mode.


    [Normal mode]
    . (df,)
  • June 7, 2013

    Just did it.

    In my last post (this one is a long time coming…) I talked about completing a personal hackathon. While my intention was pure, the ramifications of doing something just to do it were, in hindsight, asinine. If you ran your life that way you’d be left effed and wondering what the hell happened. Instead of coding just to code, write something that you know you’d use immediately. I’m not talking about a “maybe in a little while from now I’d find this useful” type of project, I’m talking about a “wow, I need to do this. Now..” project.

    Read More

  • January 3, 2013

    Just do it.

    After reading about and following the hackathons that have occurred in recent months I decided that I wanted to challenge myself with a “hackathon” of my own. The rules were simple: create a working application of any type, in any language, within 5 days. Nowhere near as challenging as most, but a worthwhile goal nonetheless.

    Read More

  • January 3, 2013

    Custom template functions with Jade and ExpressJS

    I’m going to assume a few things since you’re viewing this post. First, you’re using ExpressJS version 3+ (and by extension nodeJs). Second, that you’re using the Jade templating engine, although I think EJS would work as well.

    So with the requirements out of the way let’s throw down some code, shall we? As the title suggests we’re going to use a function that we’ve written/downloaded in our Jade template. This sounds more complicated than it actually is so stay with me. Oh and to streamline things a bit it would be easier to download a function that I wrote. You can use a function of your making, just make sure that it returns something.

    Read More

  • December 4, 2012

    The Monster Ma.. er I mean, Module Mash!

    Let me preface this post with the fact that I’m big on modular programming. There are many benefits to structuring your code in a manner that would support simplicity. And at the top of the simplicity hierarchy, for me, is the ease of tracking down errors. Because let’s face it, none of our applications are infallible so being able to diagnose and fix issues quickly is of the utmost importance. But, I also know that there are some people (I was one) that dread having to require a boatload of files multiple times like:

    // some-file.js
    var file1 = require('./lib/library1/file1')
      , file2 = require('./lib/library1/file2')
      , file3 = require('./lib/library1/file3')
      // And so on...

    Read More

  • November 7, 2012

    Running with gazelles (or using npm)

    Seeing as how I’m a pretty big fan of NodeJS I also had to become a fan of its package manager npm. Not a very hard thing to become fond of to be honest. But, there was a point when I had no clue what it was or how to use it and so I searched for any snippet or command that could be useful.

    These are just a few of the different commands that I tend to use regularly.

    Read More

  • September 5, 2012

    Escaping command prompt hell

    One little, two little, three little command prompts. Four little, five little, six little.. yea, that doesn’t have the same ring to it. Moving on then. While the rhythm may be different, the problem is the same: you’re developing an app - be it web or otherwise - and need to have a plethora of command prompts (terminals) open and running different processes that your app relies on. That’s not using your screen real estate wisely, now is it?

    Read More

  • September 3, 2012

    Going global with node.js modules

    Update: This method is obsolete since npm -g works correctly under Windows.

    Hopefully this little tip isn’t as no-brainy as I thought it was, ‘cause if it is then I’m a jackass. But, before I just start throwing instructions at you I need to set-up the situation. Let’s say you use.. I don’t know, maybe Mocha, as your testing framework. Normally you would just npm install it with every new application or you would add it to your json file. Now this is a logical way to do it, but what happens when the interface gets updated? You now have to go back and update all of your applications that use it. I don’t like making things harder for myself and since I develop primarily on a Windows box I don’t get to use the cool -g flag.. or could I?!

    Read More

  • September 6, 2012

    Stylus Mixins (Quick Tip)

    Alright, I’m bringing you yet another Stylus quick tip. This time I’m going to show you another escape issue I ran into that I think may be pertinent to you (and myself). Examples speak better than I can explain so:

    Read More