Skip to content

Instantly share code, notes, and snippets.

@mreid-moz
mreid-moz / structs.py
Last active September 2, 2016 12:33 — forked from peterbe/structs.scala
StructType([
StructField("additional_minidumps", ArrayType(StringType(), containsNull = False), nullable = True),
StructField("addons", ArrayType(StringType(), containsNull = False), nullable = True),
StructField("addons_checked", BooleanType(), nullable = False),
StructField("address", StringType(), nullable = True),
StructField("app_notes", StringType(), nullable = True),
StructField("build_id", StringType(), nullable = True),
StructField("classifications", StructType([
StructField("jit", StructType([
StructField("category", StringType(), nullable = True),
@mreid-moz
mreid-moz / TelemetryArchiveValidation.js
Last active August 29, 2015 14:27 — forked from georgf/TelemetryArchiveValidation.js
TelemetryArchive validation scratchpad
/*
* This is to be used from a Firefox scratchpad:
* - enable chrome devtools: in about:config set "devtools.chrome.enabled" to true
* - open scratchpad: Tools -> Web Developer -> Scratchpad
* - make it run as chrome: choose Environment -> Browser
* - click "Run"
*/
(function() {
var http = require('http');
var fs = require('fs');
function fail(request, response, msg) {
response.writeHead(413, {'Content-Type': 'text/plain'});
response.end(msg);
}
function postRequest(request, response, callback) {
var queryData = "";
@mreid-moz
mreid-moz / gist:4979402
Last active December 13, 2015 21:48 — forked from deinspanjer/gist:4772379
Dump your raw FHR payload to the console
/* Usage:
1. open about:healthreport
2. open a Web Console panel in that page
3. Pop the console out and expand it
4. Copy this JS code to the clipboard
5. Paste it into the command prompt at the bottom of the console
*/
let reporter = Components.classes["@mozilla.org/datareporting/service;1"].getService(Components.interfaces.nsISupports).wrappedJSObject.healthReporter;
@mreid-moz
mreid-moz / backfill.py
Created June 14, 2012 18:06
Python script to run dated pig jobs
#!/usr/bin/env python
# encoding: utf-8
import sys
import getopt
from datetime import datetime, timedelta
from subprocess import call
help_message = '''
-h, --help
-s, --start_date <start_date>