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
/** | |
* @class Interface | |
* @constructor | |
* Allows the application of the interface design pattern, by defining | |
* an interface as a name and set of methods. The methods are given a name | |
* and a number of arguments. Not type information. | |
* | |
* The methods are passed as an array, with one object per method. Each | |
* method is defined as follows in the methods array: | |
* |
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
// Copyright @2011, David Atchley ([email protected]) | |
/** | |
* @fileOverview | |
* <p> | |
* JSM stands for JavaScript Module, and is based on Perl's module and exporter | |
* facilities. Combines a number of those ideas from Perl and from the existing | |
* JSAN facility, though with some slight changes. | |
* </p> | |
* |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<!-- Stylesheets to handle CSS --> | |
<link rel="stylesheet" type="text/css" href="js/extjs/resources/css/ext-all.css" /> | |
<!-- Javascript for the applications --> | |
<!-- <script type="text/javascript" src="js/extjs/ext-all-debug.js"></script> --> | |
<script type="text/javascript" src="js/extjs/bootstrap.js"></script> | |
<script type="text/javascript"> |
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
var data = [{ | |
author: "Stephen King", | |
title: "It" | |
}, { | |
author: "Anne Rice", | |
title: "Exit to Eden" | |
}, { | |
author: "Stephen King", | |
title: "It" | |
}, { |
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
#!/bin/sh | |
# | |
# @file pre-commit | |
# @author David Atchley, <[email protected]> | |
# @date Wed Dec 18 14:02:39 CST 2013 | |
# | |
# Pre Commit checks for various syntax and cleaning prio | |
# to committing. Exits with non-zero to stop commit | |
# | |
#---------------------------------------------------------------------- |
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
" Set colorscheme to solarized | |
colorscheme solarized | |
" Change the Solarized background to dark or light depending upon the time of | |
" day (5 refers to 5AM and 17 to 5PM). Change the background only if it is not | |
" already set to the value we want. | |
function! SetSolarizedBackground() | |
if strftime("%H") >= 5 && strftime("%H") < 17 | |
if &background != 'light' | |
set background=light |
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
var mixin = function(target /*, mixins */) { | |
var args = [].slice.call(arguments, 1); | |
target.mixins = target.hasOwnProperty('mixins') ? target.mixins : []; | |
args.forEach(function(mixin) { | |
if (target.mixins.indexOf(mixin) === -1) { | |
if (typeof mixin === 'function') { | |
// Functional mixin using 'call' | |
mixin.call(target); | |
} |
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
$('document').ready(function() { | |
$('iframe').load(function() { | |
'use strict'; | |
var self = this; | |
setTimeout(function() { | |
var iframe = self, | |
w = $(iframe).width(), h = $(iframe).height(), | |
docw = iframe.contentWindow.document.width, | |
doch = iframe.contentWindow.document.height; |
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
$(document).ready(function() { | |
"use strict"; | |
var ident = 0; // generate unique element id | |
// Find all iframe DFP ads | |
$('iframe').each(function() { | |
var width = $(this).width(), | |
height = $(this).height(), |
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
if (!Array.isArray) { | |
Array.isArray = function(a) { return Object.prototype.toString.call(a) == '[object Array]'; } | |
} | |
if (!Object.isObject) { | |
Object.isObject = function(a) { return Object.prototype.toString.call(a) == '[object Object]'; } | |
} | |
// Clone an object or native type in javascript | |
// Exceptions (doesn't handle these types): |
OlderNewer