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 fs = require("fs"); | |
var url = require("url"); | |
var heartbleed = require("heartbleed"); | |
var jsonselect = require("jsonselect"); | |
var Promise = require("promise"); | |
var readFile = Promise.denodeify(fs.readFile); | |
readFile("bookmarks.json", "utf8").then(JSON.parse).then(function (data) { |
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
function loadPage(address, route, lang){ | |
page.customHeaders = {'accept-language': lang}; | |
var address = url + route; | |
var docLocator; | |
var fxaHeader; | |
if (page === 'signup'){ | |
docLocator = 'sign-up'; | |
fxaHeader = "fxa-signup-header"; | |
}else if(page === 'signin'){ |
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
'use strict'; | |
var GitHubApi = require('github'); | |
var github = new GitHubApi({ | |
version: "3.0.0" | |
}); | |
github.gists.getFromUser({ | |
user: 'pdehaan', |
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
{ | |
"name": "Push Testing", | |
"strategies": [ | |
{ | |
"name": "Single Serverz", | |
"description": "Single PushGo server, 2 sets of testers for peak of 200k connections.", | |
"container_sets": [ | |
{ | |
"name": "Test Cluster", | |
"instance_count": 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
'use strict'; | |
var fs = require('fs'); | |
var github = require('octonode'); | |
var client = github.client(); | |
var gist = client.gist(); | |
gist.create({ | |
description: 'gist description', | |
files: { |
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 fetch = require('node-fetch') | |
fetch.Promise = require('promise') | |
getEmails('testfetch@restmail.net') | |
// 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 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 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 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 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'), |
OlderNewer