Archive for the ‘Uncategorized’ Category


Combining and minifying files (in order) using Shell Scripts

In shell,Uncategorized on October 10, 2013 by Matt Grande Tagged: , , , , ,

I’ve been working on an application using Backbone.js recently. I really enjoy it, however I realised today that I now have over 100 javascript files in my project. This means that every time my page loads, the browser is making 100 separate HTTP requests. Very quickly, your site slows down.

The obvious solution is to combine all my scripts into one file and minify. I’ve done this several times before, but I needed to make sure that certain files loaded in a certain order, so I whipped up a shell script to ensure some of the files are pushed to the front of the line.

Having never really done that much shell scripting before, this wasn’t the easiest task for me. To help save others some time, I’ve attached my script and documented it pretty well. Let me know if you have any questions!


Above, you’ll see our (sample) folder structure. Under the models subfolder, we have tab.js, which needs to be loaded before subtab.js.

Below, you’ll see the gist of what I’m doing. If you have any sort of shell experience, I’m sure this isn’t a revelation, but I wish I had something like this when I started writing earlier today!

A few things to note:

  1. I highly recommend adding this code as a git hook, if you want your combined JS to be in source control
  2. The heavy lifting is done with the fabulous YUI Compressor, which requires Java to be installed (It also does CSS minification).
  3. Remember to chmod your compression script to allow you to execute or else it won’t work!


BitBucket -> GitHub migration

In Uncategorized on October 9, 2013 by Matt Grande Tagged: , , ,

The Move

Many moons ago I started releasing some of my projects out into the wild. I used BitBucket, rather that GitHub, for a few reasons. One of the biggest ones was how frustrating Git was as a Windows user when I first tried it. Coming from SVN, Hg was a much gentler introduction to the world of DVCS (thanks in large part to Joel Spolsky’s HgInit).

Now, several years later, Git is as easy to use as anything else and GitHub has a much larger community that BitBucket.

The long and short of it is, if you want the latest version of anything I’ve done, check me out on GitHub.

Other News

HamOntFire is no longer working, due to Twitter removing v1 of their API in favour of the more secure (but less open) v1.1 API. I plan on upgrading the site, but I don’t currently have time or motivation. Hopefully sometime in early 2014.

I’m currently working on another project that mixes my three greatest loves: Ruby, Rugby, and statistics. That will be done in time for the Women’s Rugby World Cup in 2014. I have a (basic) design, a database full of results, and a stats calculator built; now I just need to put them all together.



In Uncategorized on November 23, 2012 by Matt Grande Tagged:

So I haven’t really talked much about CoderCamp.  I think it’s high time that I do.

What is CoderCamp?

CoderCamp is an unconference in the same spirit as BarCamp. We started organizing them in Hamilton in response to demand for a more skill-building and code-focused event for software developers to attend. StartupDrinks allows us to get to know one another andDemoCamp allows us show off what we’ve built and get feedback from the community, but we were missing an event that’s for coders and focused on software development.

CoderCamp is for developers to learn techniques and technologies from one another in a casual setting. We meet to talk about coding, to learn from each other, and get better at what we do in the process. You don’t have to give a talk to attend, but we welcome you to come, talk and share what you know as well.

Can you dumb it down a bit?

Nerds get together and watch short, usually about five minute, presentations about programming, technology, etc.  It’s a good time.

Sounds awesome.  When’s the next one?

As of this writing, December 6 at Chester’s Beers of The World, in Gore Park.  We usually meet at 6:30 and get started at 7.  If December 6 has come & gone, check out for more info.

I have something cool to present!

Cool!  Contact myself, or one of the other organizers.  If you don’t know any of us, just show up with your demo! There’s always room for more!

See you December 6!


Grande.Pluralizer is finally properly open source.

In Uncategorized on September 6, 2012 by Matt Grande

This post is out of date. I no longer use BitBucket. Grande.Pluralizer is now available on GitHub

I’ve finally put my Pluralization engine onto a DVCS.  This will make many people happy.

I’ve chosen to put it on BitBucket.  This will make many people unhappy.

I chose BB over GitHub for two reasons:

  1. BB seems better at Mercurial support (I prefer Hg to Git, but that’s another topic altogether)
  2. I prefer BB’s UI.  I seem to be in the minority on this one, but I find BB to be nicer to use.

So, if you like Grande.Pluralizer, please download it from BitBucket.  If you come across any errors, or things you would like to see, either issue a pull request or add it to the issue tracker.

Have fun!


Google Maps Street View in Hamilton!

In Uncategorized on October 8, 2009 by Matt Grande

A couple days back, Google Maps Street View was finally added to Hamilton. Here’s some of my favourite images:

Actually, that’s all the neat stuff I’ve seen around Hamilton so far… Not that much, come to think of it.

In other news, I start a new job in just over a week. Things will be hectic for the next while, so I won’t be posting as much. And I don’t really post all that much to begin with so… Things will be really bad.

Articles Wallpaper

In Uncategorized on February 23, 2009 by Matt Grande

This has nothing to do with Ruby or .Net, but I thought it was pretty neat.

If you have a account, you should check out the Wallpaper Generator. It takes some of your top albums’ artwork and complies them into one big image. Pretty neat, and it’s not my background.

Finally, if you’re on, please feel free to add me.

Happy coding.