Skip to content

Instantly share code, notes, and snippets.

Avatar

Dale Harvey daleharvey

View GitHub Profile
View gist:7796fd520719b3d0e6015f9d915f7c8c
> file:///Users/dale/src/palmtree-result-extension/src/experiments/urlbar/mozTrie.jsm - EXPORTED_SYMBOLS is not an array.
$ cat /Users/dale/src/palmtree-result-extension/src/experiments/urlbar/mozTrie.jsm
/* 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/. */
const EXPORTED_SYMBOLS = [ "Foo" ];
function Foo() {
View gist:d42fc6b384157aade5f7ef409c01ba48
queryScorer.addDocument({
id: "fubar",
phrases: [
"home decor",
"home decoration",
"home decoration ideas",
"home decor stores"
]
})
View gist:313b307acbf3f50e32260d2c0576bdc0
~/src/gecko/browser/components/newtab (master)$ ./bin/try-runner.js
bash: ./bin/try-runner.js: Permission denied
~/src/gecko/browser/components/newtab (master)$ node ./bin/try-runner.js
TEST START | checkBundles
/Users/dale/src/gecko/browser/components/newtab/node_modules/node-sass/lib/binding.js:13
throw new Error(errors.unsupportedEnvironment());
^
Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (83)
For more information on which environments are supported please see:
View gist:2b2156e211921d886570a2108884237f
async _ensureRegionFilesSynced() {
log.info("_ensureRegionFilesSynced");
this._remoteSettings.on("sync", async ({ data: { deleted } }) => {
log.info("_ensureRegionFilesSynced sync event");
const toDelete = deleted.filter(d => d.attachment);
// Remove local files of deleted records
await Promise.all(
toDelete.map(entry => this._remoteSettings.attachments.delete(entry))
);
this._ensureRegionFilesDownloaded();
View gist:d50a87606d3610e0ebbac5c1a8abff9e
async _ensureRegionFilesDownloaded() {
log.info("_ensureRegionFilesDownloaded");
this._remoteSettings.on(
"sync",
async ({ data: { created, updated, deleted } }) => {
log.info("_ensureRegionFilesDownloaded data synced");
const toDelete = deleted.filter(d => d.attachment);
const toDownload = created
.concat(updated.map(u => u.new))
.filter(d => d.attachment);
View gist:d51392144d1f833cd33e719325b73a33
/* 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/. */
/* eslint-env mozilla/chrome-worker */
"use strict";
importScripts("resource://gre/modules/workers/require.js");
View gist:2b62732c1a36448dc998fcd22b3bdf76
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)
File "/Users/dale/src/gecko/python/mozbuild/mozbuild/artifact_commands.py", line 335, in artifact_toolchain
task, {}, task.optimization.get('index-search', []))
File "/Users/dale/src/gecko/taskcluster/taskgraph/optimize/strategies.py", line 37, in should_replace_task
task_id = find_task_id(index_path)
File "/Users/dale/src/gecko/taskcluster/taskgraph/util/taskcluster.py", line 181, in find_task_id
response = _do_request(get_index_url(index_path))
File "/Users/dale/src/gecko/taskcluster/taskgraph/util/taskcluster.py", line 104, in _do_request
response = session.get(url, stream=True, **kwargs)
View gist:c4123544aefebd520d67573dfc0a2b80
~$ pip install --upgrade pip
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
View gist:26b5b81c63f7b3ec3b88cfdbf3a1c9bc
~$ pip install --upgrade pip
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
View gist:139b3acf938c398472af1c05f3078271
~/src$ git clone hg::https://hg.mozilla.org/mozilla-unified gecko && cd gecko
Cloning into 'gecko'...
WARNING:root:Mercurial libraries not found. Falling back to native access.
WARNING:root:Native access to mercurial repositories is experimental!
error: inflate: data stream error (incorrect header check)