Skip to content

Instantly share code, notes, and snippets.

View humphd's full-sized avatar
💭
Helping others get started

David Humphrey humphd

💭
Helping others get started
View GitHub Profile
@humphd
humphd / TFExample
Created November 22, 2012 19:52 — forked from RickEyre/TFExample
Test Fixture Example
public CueTest : public testing::Test
{
protected:
virtual void LoadVTT( char *fileName, uint expectedNumberOfCues )
{
parser = ItemStorageParser( fileName );
//todo (did it work)
ASSERT_TRUE( parser.parse() ); << "parser.parse() failed"
@humphd
humphd / TFExample
Created November 22, 2012 19:52 — forked from RickEyre/TFExample
Test Fixture Example
public CueVerticalTest : public testing::Test
{
protected:
virtual void SetUp()
{
}
virtual void SetFile(char * fileName)
{
@humphd
humphd / gist:3006865
Created June 27, 2012 21:09 — forked from mjschranz/gist:3004993
Page Tests
/*global text,expect,ok,module,notEqual,Butter,test,window*/
(function (window, document, Butter, undefined) {
require( [ "../src/core/page", "../src/core/config", "../src/dependencies" ],
function( Page, Config, Dependencies ) {
var _config = Config.parse( '{ "test": "derp" }' ),
_loader = Dependencies( _config ),
_page = new Page( _loader, _config );
var $document = document
@humphd
humphd / Huh
Created May 16, 2012 22:02 — forked from mjschranz/Huh?
Something
css: function( url, exclude, callback, checkFn ){
var scriptElement;
checkFn = checkFn || function(){
return !!scriptElement;
};
url = fixUrl( url );
var interval;
function f() {
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script>
// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcorn instance by calling the Youtube player plugin
@humphd
humphd / popcorn-youtube.html
Created June 20, 2011 17:27 — forked from brettgaylor/gist:1032479
Popcorn YouTube Example
<!doctype html>
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script src="http://popcornjs.org/code/dist/popcorn-super-hack-for-documentation.js"></script>
<script>
// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcorn instance by calling the Youtube player plugin