Skip to content

Instantly share code, notes, and snippets.

View MikeRatcliffe's full-sized avatar
😁

Mike Ratcliffe MikeRatcliffe

😁
View GitHub Profile
{"schemaVersion":1,"label":"coverage","message":"44%","color":"orange"}
@MikeRatcliffe
MikeRatcliffe / trace.js
Created October 29, 2022 10:20
Function Tracing
const _apply = Function.prototype.apply;
const _call = Function.prototype.call;
_apply.apply = _apply;
_call.apply = _apply;
Function.prototype.toString.apply = _apply;
Array.prototype.slice.apply = _apply;
console.trace.apply = _apply;
@MikeRatcliffe
MikeRatcliffe / debugger.test
Created May 23, 2022 17:05
13 test failures (same with and without patch)
devtools/client/debugger/test/mochitest/browser_dbg-breakpoints-popup.js
FAIL Test timed out -
devtools/client/debugger/test/mochitest/browser_dbg-features-asm.js
FAIL Test timed out -
devtools/client/debugger/test/mochitest/browser_dbg-pretty-print-breakpoints-delete.js
FAIL Test timed out -
devtools/client/debugger/test/mochitest/browser_dbg-tabs-without-urls.js
FAIL undefined assertion name - Got +0, expected 2
Stack trace:
chrome://mochikit/content/browser-test.js:test_is:1422
sromrev=11
subvid=0x14e4
boardtype=0x61b
boardrev=0x1421
vendid=0x14e4
devid=0x43ba
macaddr=xx:xx:xx:xx:xx:xx
ccode=00
#!/usr/bin/env node
/**
* Very simple node script to validate an email address against its SMTP server.
*
* Usage:
* node validate.js email@mail.com
*
* This script uses the following process to validate an email address:
* 1. Get the domain of the email
➜ ./mach create-mach-environment -f
created virtual environment CPython3.9.1.final.0-64 in 403ms
creator CPython3Posix(dest=/Users/ratcliffes/.mozbuild/_virtualenvs/mach, clear=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/ratcliffes/Library/Application Support/virtualenv)
added seed packages: pip==20.2.2, setuptools==49.6.0, wheel==0.35.1
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
Collecting cffi==1.14.4
Using cached cffi-1.14.4.tar.gz (471 kB)
Collecting pycparser==2.20
@MikeRatcliffe
MikeRatcliffe / copyToFat32.sh
Created May 18, 2020 18:32 — forked from nabilfreeman/copyToFat32.sh
FAT32 File copier & splitter (works with Multiman)
#!/bin/bash
# Are you using Mac OS X?
# You need to install coreutils for this to work.
# try `brew install coreutils`
# or `sudo port install coreutils`
# set a part size that works with FAT32 drives
PART_SIZE=3999
# nice little intro
@MikeRatcliffe
MikeRatcliffe / Storage Panel Fission.md
Last active December 17, 2019 20:23
Storage Panel Fission

Storage Panel Fission and Migration to Application Panel

Plan

We have decided to make a number of architectural changes to the Storage Panel to simplify the process of migrating to fission. Most of the original code can be reused but a number of changes need to be made in order to prepare the code for migration.

We will first make a number of changes to the Storage Panel and then migrate it to the application panel (and to fission).

These changes can be summarised as follows:

diff --git a/devtools/client/framework/toolbox.js b/devtools/client/framework/toolbox.js
--- a/devtools/client/framework/toolbox.js
+++ b/devtools/client/framework/toolbox.js
@@ -104,16 +104,18 @@ loader.lazyGetter(this, "registerHarOver
*/
function Toolbox(target, selectedTool, hostType, contentWindow, frameId,
msSinceProcessStart) {
this._target = target;
this._win = contentWindow;
this.frameId = frameId;
render() {
let {
dispatch,
snapshots,
front,
heapWorker,
allocations,
toolbox,
filter,
diffing,