Skip to content

Instantly share code, notes, and snippets.

View mikehenrty's full-sized avatar

Michael Henretty mikehenrty

View GitHub Profile
marionette('testing b2g-desktop', { host: 'path/to/b2g-desktop', type: 'sync', function() {
var clientA = marionette.createClient({ /* profileOptions */ });
var clientB = marionette.createClient({ /* profileOptions */ });
test('test my thing', function() {
clientA.goUrl();
clientB.goUrl();
});
});
@mikehenrty
mikehenrty / gist:6c506767b0fb15aaa2d4
Created May 20, 2015 14:44
Mozilla-Central patch for linked data events
diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js
--- a/dom/browser-element/BrowserElementChildPreload.js
+++ b/dom/browser-element/BrowserElementChildPreload.js
@@ -515,22 +515,28 @@ BrowserElementChild.prototype = {
let win = e.target.ownerDocument.defaultView;
// Ignore metas which don't come from the top-level
// <iframe mozbrowser> window.
if (win != content) {
debug('Not top level!');
return;
@mikehenrty
mikehenrty / Queue.js
Last active February 6, 2017 12:31
A simple task queue class
function Queue() {
this.tasks = [];
this.results = [];
this.onFinished = null;
}
Queue.prototype._taskComplete = function() {
this.results.push(arguments);
this._runNextTask();
};
I don't like coconuts.
She was here first.
My greatgrandfather planted this tree.
She went looking for you with Uncle Billy.
You like every boy.
You're the only one in town that can help me.
Do you like it?
You seen my wife?
I've heard of things like this.
I can't find it anywhere.
@mikehenrty
mikehenrty / gist:9ea8211a4abdd57d6c16f8466425bd53
Created February 28, 2017 13:24
VoiceBank, It's a Wonderful Life, Dialog (unmixed)
I owe everything to George Bailey.
Help my friend Mr. Bailey.
Help my son George tonight.
George is a good guy.
Watch over him tonight.
Something's the matter with Daddy.
Please bring Daddy back.
Whose turn is it?
It's that clock-maker's turn again.
We've passed him up right along.
@mikehenrty
mikehenrty / common-voice-data-parser.js
Created November 14, 2017 10:23
This file parses a common voice data directory and outputs stats about the data.
const fs = require('fs');
const path = require('path');
const crypto = require('crypto');
const mp3Duration = require('mp3-duration');
const OUTPUT_FOLDER = path.resolve('./output/batch');
const DOWNLOAD_FOLDER = path.resolve('./sample');
const DEFAULT_SALT = '8hd3e8sddFSdfj';
const CONCURRENCY = 50;
const readline = require('readline');
const fs = require('fs');
// CHANGE THESE TO INPUT AND OUTPUT FILES
const FILE_PATH = './11k-german-sentences.txt';
const OUTPUT_PATH = './output.csv';
const rl = readline.createInterface({
input: fs.createReadStream(FILE_PATH),
});
# Dockerfile
FROM amazonlinux:latest
COPY ./MariaDB.repo /etc/yum.repos.d/
RUN yum makecache fast
RUN yum -y install MariaDB-server MariaDB-client
# MariaDB.repo
[mariadb]
name = MariaDB