This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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/automation-tests/tests/remove-email.js b/automation-tests/tests/remove-email.js | |
index 8e7e0de..16defd1 100644 | |
--- a/automation-tests/tests/remove-email.js | |
+++ b/automation-tests/tests/remove-email.js | |
@@ -140,6 +140,8 @@ runner.run(module, { | |
browser.chain({onError: done}) | |
.wwin() | |
.get(link) | |
+ .wtype(CSS['persona.org'].signInForm.password, secondaryPassword) | |
+ .wclick(CSS['persona.org'].signInForm.finishButton, secondaryPassword) |
This file contains hidden or 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/lib/configuration.js b/lib/configuration.js | |
index 5736fde..8456373 100644 | |
--- a/lib/configuration.js | |
+++ b/lib/configuration.js | |
@@ -294,7 +294,17 @@ var conf = module.exports = convict({ | |
forcible_issuers: { | |
doc: "Hostnames which this Persona instance will issue identies for. Used in b2g only.", | |
format: 'array { string }* = [ "fxos.login.persona.org"]', | |
- } | |
+ }, |
This file contains hidden or 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
use strict; | |
use POSIX qw(strftime); | |
my $slots = {}; | |
# 1395889976.092 10.178.6.136 "GET / HTTP/1.1" 200 71 "-" "ELB-HealthChecker/1.0" "-" 0.002 | |
# 1395962183.009 10.178.6.136 "POST /v1/certificate/sign HTTP/1.1" 200 822 "-" "python-requests/2.2.1 CPython/2.7.3 Linux/3.5.0-23-generic" "54.218.210.15" 0.458 | |
while (<STDIN>) { | |
next unless m@certificate/sign@; |
This file contains hidden or 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 P = require('bluebird') | |
var util = require('util') | |
var memcached = require('memcached') | |
var underscore = require('underscore') | |
function getItems(mc) { | |
var dfd = P.defer() | |
mc.items(function(err, result) { | |
if (err) return dfd.reject(err) | |
dfd.resolve(result) |
This file contains hidden or 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 Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
var obj1 = { food: Buffer('c0ffee', 'hex'), bar: 3 }; | |
var obj2 = { | |
'id': Buffer('eceb3ae8aee125e2', 'hex'), | |
'secret': Buffer('281a885146ee216844d1ffd0d725ee714101548a1e6507f1a40fb2c2ae0c11f1', 'hex'), | |
'name':'blah', |
This file contains hidden or 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 |