Skip to content

Instantly share code, notes, and snippets.

View zaach's full-sized avatar
🎯
Focusing

Zach Carter zaach

🎯
Focusing
View GitHub Profile
@zaach
zaach / g.js
Created January 29, 2013 02:37
/* generated by jison-lex 0.1.0 */
var bah = (function(){
var lexer = {
EOF:1,
parseError:function parseError(str, hash) {
if (this.yy.parser) {
this.yy.parser.parseError(str, hash);
} else {
throw new Error(str);
}
remote: > browserid@1.0.0-b1 postinstall /tmp/deploy11292-3334-15gmn7h
remote: > node ./scripts/postinstall.js
remote:
remote: >> delete ancient code
remote: >> move old code out of the way
remote: >> move new code into place
remote: >> setting env vars from .awsbox.json: CONFIG_FILES
remote: >> postdeploy hook
remote: >> no keypair needed. you gots one
remote: >> generating production resources
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// This JS shim contains the callbacks to fire DOMRequest events for
// navigator.pay API within the payment processor's scope.
"use strict";
requireApp('system/js/identity.js');
requireApp('system/test/unit/mock_chrome_event.js');
requireApp('system/test/unit/mock_popup_manager.js');
suite('identity', function() {
var subject;
var realPopupManager;
suiteSetup(function() {
subject = Identity;
@zaach
zaach / gist:3795452
Created September 27, 2012 18:04 — forked from jedp/gist:3778932
B2G repo setup and build quickstart

B2G Quickstart for Payments and Identity

This sets you up to make two separate targets:

  • One for a desktop [simulator] [1]
  • One for the ZTE [device] [2]

These are the moving parts:

  • [mozilla-inbound repo] [3] clone (hg)
  • [gaia repo] [4] fork (git)
  • [B2G project clone] [5] (git)
zachbook ~/moz/b2g-src/mi $ hg pull
The authenticity of host 'hg.mozilla.org (63.245.215.25)' can't be established.
RSA key fingerprint is fa:e8:5a:cc:de:02:e0:c7:6e:ff:14:92:90:b9:12:be.
Are you sure you want to continue connecting (yes/no)? yes
remote: Warning: Permanently added 'hg.mozilla.org,63.245.215.25' (RSA) to the list of known hosts.
remote: Permission denied (publickey,keyboard-interactive).
abort: no suitable response from remote hg!
{
"test_can_change_user_password": {
"result": "error",
"class": "123done.tests.test_change_password.TestChangePassword",
"duration": "0.0",
"url": "https://saucelabs.com/jobs/f965a27f0eef47b7915e5c547193c3f5"
},
"test_that_user_can_logout": {
"result": "error",
"class": "123done.tests.test_logout.TestLogout",
@zaach
zaach / gist:3177838
Created July 25, 2012 18:46
is there a shasum in .cache.json?
for i in ~/.npm/*; do echo "$i"; find $i -name ".cache.json" -exec grep "shasum" '{}' \; | wc ; done
/Users/zcarter/.npm/JSONSelect
1 6 840
/Users/zcarter/.npm/JSV
1 13 988
/Users/zcarter/.npm/async
1 33310 286998
/Users/zcarter/.npm/bcrypt
1 20 2013
/Users/zcarter/.npm/bigint
@zaach
zaach / regex.js
Created July 12, 2012 16:49
origin regex
//var org = /^https?:\/\/(?=.{1,254}(?::|$))(?:(?!\d|-)(?![a-zA-Z0-9\-]{1,62}-\.)[a-zA-Z0-9\-]{1,63}\.)*(?:(?!\d|-)(?![a-zA-Z0-9\-]{1,62}-$)[a-zA-Z0-9\-]{1,63})(:\d+)?$/;
var org = /^https?:\/\/(?=.{1,254}(?::|$))(?:(?!\d|-)(?![a-z0-9\-]{1,62}-(?:\.|:|$))[a-z0-9\-]{1,63}\b(?!\.$)\.?)+(:\d+)?$/i;
/* Origin regex explained
/^ // beginning
https?:\/\/ // starts with http:// or https://
(?=.{1,254}(?::|$)) // the hostname chars must be within 1-254 bytes
#!/usr/bin/env node
/*
* This module can verify that packages installed during development are
* identical to those installed during deployment. The standard npm shrinkwrap
* only ensures that package versions are the same, but does not verify contents.
* This module checks the shasum of the package tarballs downloaded by npm during
* development and deployment to ensure they are the same.
*
* Usage: