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 / 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=
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 / 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... -->
@humphd
humphd / gist:6584999
Created September 16, 2013 19:02
safeLookup of a JSON inflated object along a path
function safeLookup(obj, propPath, fallback) {
fallback = fallback || '';
var props = propPath.split('.');
// Descend obj along the path specified in propPath, but
// don't trust that that path is good, and may contain
// undefined routes.
try {
props.forEach(function(prop) {
@humphd
humphd / readme.md
Created April 23, 2014 15:59
Github Discusion

==Git and Github==

@humphd
humphd / index.js
Last active August 29, 2015 14:05
MakeDrive Client API Example
// MakeDrive API - https://github.com/mozilla/makedrive
var MakeDrive = require('./path/to/makedrive.js');
// fs API - https://github.com/js-platform/filer#filer
var fs = MakeDrive.fs();
// Use fs right away, with or without network
fs.mkdir('/project', function(err) {
if(err) throw err;
@humphd
humphd / Gruntfile.js
Created October 6, 2014 16:57
Testing new feature for grunt
module.exports = function( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( "package.json" ),
jshint: {
options: {
"-W069": true // ignore "['...'] is better written in dot notation." warnings
},
files: [
"Gruntfile.js",
"install-webmaker.js",
@humphd
humphd / gist:d4021a069f803c0dde78
Created April 24, 2015 16:37
WebSocket thing
function send(mp3Url, duration) {
var url = "ws://your websocket server url here";
var msg = {
"play": mp3Url,
"duration": duration
};
var ws = new WebSocket(url);
ws.onopen = function() {
if(ws.readyState !== ws.OPEN) {
@humphd
humphd / test.html
Last active August 29, 2015 14:23
Trying to debug IE loading of Bramble API
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bramble Loading in IE</title>
<script src="https://mozillathimblelivepreview.net/bramble/dist/bramble.js"></script>
</head>
<body>
<script>
document.write(window.Bramble ? "It worked" : "It failed");