"if-equal" Handlebars helper for Ember or Node

Sometimes creating a view/controller + computed property macro is a bit of overkill for some situations where you ‘should’ separate logic from views.

Anyways, here’s a nice Handlebars helper to add some conditional logic to your templates.

Ember.Handlebars.helper('if-equal', function(val, test, options) {
    var arrTest = test.split('||');
    for (var i = 0; i < arrTest.length; i++) {
        if (val === arrTest[i]) {
          return options.fn(this);
      return options.inverse(this);

So now, in your template, just use:

   {{#if-equal story.type 'video||photo'}}
       < h1> Show me if type is video or photo< /h1>

DasHub: A dashboard for Github Issues

DasHub is a lightweight (kanban-style) tool to make GitHub Issues more visible and manageable to teams using Github for issue tracking. 

The entire application is written in javascript using Ember.js

Source on Github



- Ember.js
- Ember App Kit (EAK)
- Github issues API
- Client-side basic auth
- Javascript
- Sass

Upcoming Planned features


A web component for the Weather

A card-style weather HTML5 web component example using Polymer.js.

<Source on GitHub/>



- Meteocons: weather condition icon fonts 
- WeatherUnderground API
- HTML5 Geolocation api
- HTML5 localstorage
- Polymer.js


Front-end tools brought to you by Twitter

Twitter has ‘contributed’ a lot to the open web. Here are a few examples.

  • Flight.js - a lightweight, component-based JavaScript framework  (started ~Jan 2013)
  • Flight-generator - a Yeoman generator to Flight.js
  • Jasmine-Flight - a set of Jasmine helpers for testing your Flight.js app
  • Hogan.js - a mustache-based js template compiler 
  • RECESS - a CSS style hinter on top of LESS 
  • Bootstrap - although no longer maintained by Twitter, I had to mention this ubiquitoius CSS framework. 
  • Typeahead.js - a fast and fully-featured autocomplete library

And yes, there’s more back-end stuff too. See the full list of repos @ http://twitter.github.io/ 


Rise of the Static Site generators

  I’ve seen a serious uptick in new web publishing projects, over the last 6 months. I think a lot of web developers are pretty unsatisfied with the current approach to the creating content on the web. Stuff like Wordpress, Drupal, Tumblr, Movable Type, etc, all have there pain points, shortcomings, and serious baggage. 


So… we enter a “old but new” wave of how to publish to the web. Albeit, the new shiny platforms are built for developers, but keep an eye out for Jekyll-inspired static site platforms like Harp, Roots, Punch, DocPad & Wintersmith because they could be a strong indicator of what’s coming down the pike.

The common tools used across all these platforms seem to of course be the trendy ones: Javascript, Node.js, Express, Markdown, Jade, Stylus & Coffeescript.



It’s worth diving into Javascript

When I get questions from non-programmers on what language to learn first, I’m fairly convinced that my best suggestion, as of today, is to seriously take up Javascript. 

Even though Javascript has quite a few quirks and shortcomings, I would have to say that it is the most rewarding language to get into since there is so much you *can* do with it. Not to mention, every company needs a javascript developer (or will soon). Also, javascript isn’t really as bad as people tend to think, it is really just the most misunderstood. So if you’re going to learn it, you’re going to have to dive deep.

It has also become the swiss-army knife of programming languages. Mostly thanks to the amazingly successful projects like jQueryGoogle’s V8, and Node.js. Not to mention the fast-growing community that has sprung up around Node’s Packaged Modules (NPM) 

So to get started, check out:

I also suggest using these tools/libraries to get your hands dirty.

Here’s a great JS101 course (via blog posts):

When you’re ready to start building serious apps, checkout Ember.js  

Have fun and keep making javascript better!


User-Authenticated Event Tracking with jQuery + Google Analytics

You probably already know about Google Analytics, and if you use it enough you may even know about Event Tracking with Google Analytics , but haven’t quite figured out an easy and useful way to put it to use, so here’s an idea.

I typically use an MVC framework like Ruby on Rails or Asp.Net MVC to build web apps. However, any framework that allows you to authenticate a user (maybe PHP, Node.js, or Python) and return the username to your html view\page will work for this solution.

Once you have Google Analytics & jQuery working on your page, all you have to do is put this little jQuery nugget on your page:

*example uses ASP.Net Razor syntax to include the authenticated user’s username*

Now, you can easily create a custom report in GA, that looks like this:


Obviously, this can be pretty useful, since you’re now able to track the users that are logged onto your site and even try to understand user’s behavior flow.

Btw, I should disclose that storing “personally identifiable information” is against the GA terms of use, so storing a username could result in getting your GA account banned


Google Calendar Reader : jQuery Plugin

I was really surprised that I couldn’t find a plugin or widget that already did this, so I figured I’d make a jQuery plugin to read a public google calendar feed and custom format it so that it can be display on your site and have your own styles applied. Here’s how the gCal reader plugin works.

Here’s a link to the github repo: https://github.com/bradoyler/GoogleCalReader-jquery-plugin

Demo is here: http://w3portals.com/SDevents.html

Screenshot: (i know, its ugly)