Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/emailserver.js b/emailserver.js | |
index e40f738..9a063c2 100755 | |
--- a/emailserver.js | |
+++ b/emailserver.js | |
@@ -24,6 +24,32 @@ function logError(err) { | |
log("ERROR (oh noes!): " + err); | |
} | |
+function mailSummary(mail) { | |
+ const deliveryTime = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// returns all the prime factors of a positive integer | |
function prime_factors(n) { | |
var factors = []; | |
var div = 2; | |
while (n > 1) { | |
while (n % div == 0) { | |
factors.push(div); | |
n /= div; | |
} | |
div++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# start Firefox with disposable profiles on osx | |
# usage: start-ff.sh profilename Firefox.app | |
# start-ff.sh profilename Aurora.app | |
# start-ff.sh profilename Nightly.app | |
PROFILE_NAME=abcabdab-sync1 | |
if [ ! -z "$1" ]; then | |
PROFILE_NAME=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Run this script after editing ./fxa/yaml/type/fxa.fxa_oauth.prod.yaml or | |
// ./fxa/yaml/type/fxa.fxa_oauth.stage.yaml and fix any typos before | |
// committing changes. | |
var assert = require('assert') | |
var fs = require('fs') | |
var yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.stderr.write = (function(writer) { | |
return function(string, encoding, fd) { | |
writer.call(process.stderr, 'hooked => '); | |
writer.apply(process.stderr, arguments); | |
} | |
})(process.stderr.write); | |
process.stderr.write('foo\n'); | |
console.error('bar'); | |
console.log('baz'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var convertTimes = true; | |
function handleEmail(obj) { | |
delete obj.pub; | |
delete obj.priv; | |
var cert = obj.cert; | |
if (cert) { | |
delete cert.header; | |
var payload = cert.payload; | |
if (payload) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
my $requests = {}; | |
sub strip_args { | |
$_ = $_[0]; | |
s/\?ver=.*/\?ver=/; | |
s/\?email=.*/\?email=/; | |
s/\?token=.*/\?token=/; | |
s/\?domain=.*/\?domain=/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage: cat file | verifier-metrics.js | |
const ONE_HOUR_MS = 60*60*1000; | |
function handleData(data, struct) { | |
var message, epoch = Date.parse(data.timestamp); | |
try { | |
message = JSON.parse(data.message); | |
} catch(e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"domains": { | |
/* | |
"browserid.org": [ | |
"browserid-org-0520-1279444257.us-east-1.elb.amazonaws.com" | |
], | |
"www.browserid.org": [ | |
"browserid-org-0520-1279444257.us-east-1.elb.amazonaws.com" | |
], | |
*/ |
NewerOlder