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 / gist:4668251
Created January 29, 2013 21:50
Imagining a Markup API version of http://popcorn.webmadecontent.org/imv_
<!DOCTYPE html>
<head>
<base href="https://popcorn.webmaker.org/templates/basic/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Popcorn Maker</title>
<!-- Other stuff in head... -->
DIFF against humphd/rillian patch, focused on Mozilla build integration
diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/content/public/nsHTMLMediaElement.h
index e822318..049fb9b 100644
--- a/content/html/content/public/nsHTMLMediaElement.h
+++ b/content/html/content/public/nsHTMLMediaElement.h
@@ -24,17 +24,17 @@
#include "nsTimeRanges.h"
#include "nsIDOMWakeLock.h"
#include "AudioChannelCommon.h"
@humphd
humphd / track-element.diff
Created January 17, 2013 12:43
Patch update work so far (WIP). Based on mozilla-central git revision 1acf9935d4
diff --git a/configure.in b/configure.in
index 07cffe0..b07885c 100644
--- a/configure.in
+++ b/configure.in
@@ -4262,6 +4262,7 @@ MOZ_OMX_PLUGIN=
MOZ_VP8=
MOZ_VP8_ERROR_CONCEALMENT=
MOZ_VP8_ENCODER=
+MOZ_WEBVTT=1
VPX_AS=
@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:3229279
Created August 1, 2012 17:56
Embed Structure
tools/embed.js
({
baseUrl: '../src',
paths: {
'text': '../external/require/text'
},
has: {
@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() {
@humphd
humphd / twitter-scramble.js
Created April 22, 2012 20:59
Twitter Scramble
/**
* Swap Twitter pictures, remove names from tweets in your twitter
* stream. The effect is often hilarious. Can you figure out who
* said what?
*
* Assumes you're running this bookmarklet from twitter.com.
*
* Quick hack, please improve as you see fit. @humphd
**/
<!doctype html>
<html>
<head>
<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 Popcorn("#id-of-my-video")
var pop = Popcorn("#ourvideo");