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 / 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");
This is test
this is another test.
<!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");
@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
<!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
<!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");