This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//main.js | |
require.config({ | |
paths: { | |
jquery: 'components/jquery', | |
underscore: 'components/underscore', | |
backbone: 'components/backbone' | |
}, | |
shim: { | |
jquery: { exports: '$' }, | |
underscore: { exports: '_' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This SQL implements the Double Metaphone algorythm (c) 1998, 1999 by Lawrence Philips | |
-- it was translated to Python, and then to SQL from the C source written by Kevin Atkinson (http://aspell.net/metaphone/) | |
-- By Andrew Collins - Feb, 2007 who claims no rights to this work | |
-- http://www.atomodo.com/code/double-metaphone/metaphone.sql/view | |
-- Tested with MySQL 5.1 on Ubuntu 6.01 and Ubuntu 10.4 | |
-- Updated Nov 27, 2007 to fix a bug in the 'CC' section | |
-- Updated Jun 01, 2010 to fix a bug in the 'Z' section - thanks Nils Johnsson! | |
-- Updated Jun 25, 2010 to fix 16 signifigant bugs - thanks again Nils Johnsson for a spectacular | |
-- bug squashing effort. There were many cases where this function wouldn't give the same output | |
-- as the original C source that were fixed by his careful attention and excellent communication. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['backbone'],function(Backbone){ | |
// Modified from from Backbone.Router v 0.9.2 | |
var DelegatingRouter = function(args) { | |
if (!args.delegate) { throw("delegate is required arg to DelegateRouter"); } | |
if (!args.routes) { throw("routes is required arg to DelegateRouter"); } | |
Backbone.history || (Backbone.history = new Backbone.History); | |
_delegate_routes(this, args.delegate, args.routes); | |
// if (!Backbone.history.start({pushState: true})) { | |
// // window.location.href = "/404.html"; |