Skip to content

Instantly share code, notes, and snippets.

View seanhagen's full-sized avatar
:shipit:
coding

Sean Hagen seanhagen

:shipit:
coding
  • Flight Center Travel Group
  • Vancouver, British Columbia
  • 16:23 (UTC -07:00)
View GitHub Profile
@seanhagen
seanhagen / build.xml
Last active December 28, 2015 03:49
Template for Phing build files
<?xml version="1.0" encoding="UTF-8" ?>
<project name="==PROJECT NAME HERE==" basedir="." default="main">
<!--
This is a file that should be in the same directory as this file.
It defines some basic variables for use in this build file.
Some variables are required for each project, regardless of type:
version: defines the current version of your project.
branch: defines the default branch to build
url: should always be defined, but empty
@seanhagen
seanhagen / build.xml
Created November 12, 2013 20:15
Small Phing target to update a file with the current build version. Requires 'version' to be set in project.properties
<target name="-set.buildtime">
<php expression="date('Ymdhms');" returnProperty="build_time" />
<property name="build.version" value="${version}-${build_time}" />
<echo>Build number: ${build.version}</echo>
<delete file="${phing.dir}/build.txt" />
<echo file="${phing.dir}/build.txt">${build.version}</echo>
</target>
@seanhagen
seanhagen / video.js
Created October 23, 2013 18:21
Example unit tests for Backbone.js model
describe( "Video model", function(){
var MOCK_GET_DATA = {
channelName: "tgndeveloperedu",
commentCount: 0,
defaultOrder: 0,
dislikeCount: 0,
facebookCount: "0",
googleCount: "0",
likeCount: 0,