$ node index https://call.stage.mozaws.net/config.js | python test.py
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 fetch = require('node-fetch') | |
| fetch.Promise = require('promise') | |
| getEmails('[email protected]') | |
| // Filter only FxA emails and only return the x-link header. | |
| .then((messages) => messages.filter(filterFunc).map(getLink)) | |
| .then(console.log) | |
| .catch(console.error) | |
| function getEmails (account) { |
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 ngrok = require('ngrok') | |
| var PORT = process.env.PORT || 8080 | |
| ngrok.connect(PORT, function (err, url) { | |
| if (err) { | |
| return console.error(err) | |
| } | |
| console.log('success: %s', url) | |
| }) |
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
| import groovy.json.JsonSlurper | |
| Map getJson(String project) { | |
| String repoUrl = "https://raw.githubusercontent.com/mozilla-services/services-test/master/e2e/${project}/package.json".toString() | |
| JsonSlurper jsonSlurper = new JsonSlurper() | |
| return jsonSlurper.parse(repoUrl.toURL()) | |
| } | |
| Map datum = getJson('pocket') | |
| println datum.name + '@' + datum.version |
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
| module.exports = function (grunt) { | |
| grunt.registerMultiTask('l10n-json-to-html', 'Convert l10n JSON files to HTML', function () { | |
| var done = this.async(); | |
| var yeoman = grunt.config('yeoman'); | |
| var fileCount = 0; | |
| this.files.forEach(function (file) { | |
| var src = file.src[0]; | |
| // Convert source file to something like '.tmp/i18n/{locale}/{file}.html'. | |
| var dst = src.replace(yeoman.dist, yeoman.tmp).replace(/\.json$/i, '.html'); |
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 gulp = require('gulp'), | |
| autoprefixer = require('gulp-autoprefixer'), | |
| cache = require('gulp-cache'), | |
| committers = require('gulp-git-committers'), | |
| concat = require('gulp-concat'), | |
| data = require('gulp-data'), | |
| del = require('del'), | |
| eslint = require('gulp-eslint'), | |
| imagemin = require('gulp-imagemin'), | |
| jade = require('gulp-jade'), |
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
| $ git diff | |
| diff --git a/apps/system/fxa/test/marionette/fxa_launch_test.js b/apps/system/fxa/test/marionette/fxa_launch_test.js | |
| index 5b9ce94..9e3c702 100644 | |
| --- a/apps/system/fxa/test/marionette/fxa_launch_test.js | |
| +++ b/apps/system/fxa/test/marionette/fxa_launch_test.js | |
| @@ -1,10 +1,9 @@ | |
| 'use strict'; | |
| -var fs = require('fs'), | |
| - FxA = require('./lib/fxa'), |
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
| function sendMsgToSW(){ | |
| sendMessage({ | |
| command: 'helloWorld', | |
| url: 'foo' | |
| }).then(function(val) { | |
| // If the promise resolves, just display a success message. | |
| writeLog('postMessage promise returned'); | |
| writeLog(val); | |
| return val; | |
| }).catch(console.error); |
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
| [DEFAULT] | |
| envs: dev,stage, pre-prod | |
| base_url: hello.firefox.com | |
| [SectionOne] | |
| Status: Single | |
| Name: Derek | |
| Value: Yes | |
| Age: 30 | |
| Single: True |
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
| const API_KEY = 'xxx'; | |
| const promisify = require('es6-promisify'); | |
| const safebrowsing = require('googleapis').safebrowsing('v4'); | |
| const _findThreatMatches = promisify(safebrowsing.threatMatches.find); | |
| const pkg = require('./package.json'); | |
| const client = { | |
| clientId: pkg.name, |