Skip to content

Instantly share code, notes, and snippets.


Sean Hagen seanhagen

  • Flight Center Travel Group
  • Vancouver, British Columbia
  • 07:22 (UTC -07:00)
View GitHub Profile
seanhagen / video.js
Created October 23, 2013 18:21
Example unit tests for Backbone.js model
View video.js
describe( "Video model", function(){
channelName: "tgndeveloperedu",
commentCount: 0,
defaultOrder: 0,
dislikeCount: 0,
facebookCount: "0",
googleCount: "0",
likeCount: 0,
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
View build.xml
<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>
seanhagen / build.xml
Last active December 28, 2015 03:49
Template for Phing build files
View build.xml
<?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 / composer.json
Last active December 28, 2015 03:49
Required dev libraries for code testing and analysis
View composer.json
"require-dev": {
"phpmd/phpmd": "dev-master",
"pdepend/pdepend": "dev-master",
"phploc/phploc": "2.0.*@dev",
"squizlabs/php_codesniffer": "dev-master",
"sebastian/phpcpd": "2.0.*@dev",
"sebastian/phpdcd": "1.0.*@dev",
"shrink/phpcpd": "dev-master",
"shrink/finder-facade": "dev-master",
"codeception/codeception": "dev-master",
seanhagen / composer.json
Last active December 28, 2015 03:49
Required parts of a composer.json file to auto-update npm modules
View composer.json
"scripts": {
"post-install-cmd": [
"npm install"
"post-update-cmd": [
"npm install"
seanhagen / package.json
Last active December 28, 2015 04:09
Example package.json
View package.json
"name": "project-name-here",
"version": "0.0.1",
"author": "Your Name <>",
"description": "Simple project description",
"dependencies": {
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-shell": "~0.4.0",
"grunt-env": "*",
seanhagen / Gruntfile.js
Last active December 28, 2015 04:09
Example Gruntfile.js
View Gruntfile.js
module.exports = function(grunt){
var join = require("path").join;
pkg: grunt.file.readJSON( 'package.json' ),
env: {
seanhagen / Emacs Tips.txt
Created November 13, 2013 08:49
Emacs Tips & Tricks
View Emacs Tips.txt
Indent By A Specific Number Of Spaces:
C-u # C-x TAB
Flyspell Correct Word ( cycles )
Flyspell GoTo Next Bad Spelling
seanhagen /
Created November 19, 2013 19:54
Example file
seanhagen / pre-commit.txt
Created November 19, 2013 20:34
Pre-Commit Hook Example
View pre-commit.txt
cd ${0%/*}
cd ../../code
bin/phing -f build.xml analyze-quick