Skip to content

Instantly share code, notes, and snippets.

View michaelcox's full-sized avatar

Michael Cox michaelcox

View GitHub Profile
@michaelcox
michaelcox / FAQ-XSL-Template.xsl
Created February 14, 2011 20:37
XSL Template for saving Frequently Asked Questions as XML, and outputting to HTML.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes" />
<xsl:template match="/faq_page">
<xsl:if test="count(//question) &gt; 5">
<xsl:for-each select="category">
@michaelcox
michaelcox / collections.js
Last active August 29, 2015 14:05
Backbone Unit Testing
define(function(require) {
var Backbone = require('backbone');
var _ = require('underscore');
var models = require('./models');
var collections = {};
collections.Posts = Backbone.Collection.extend({
model: models.Post,