Skip to content

Instantly share code, notes, and snippets.

View MikeRatcliffe's full-sized avatar
😁

Mike Ratcliffe MikeRatcliffe

😁
View GitHub Profile
This file has been truncated, but you can view the full file.
var Zo = Object.defineProperty;
var No = (s, o, _) =>
o in s
? Zo(s, o, { enumerable: !0, configurable: !0, writable: !0, value: _ })
: (s[o] = _);
var Fo = (s, o) => () => (o || s((o = { exports: {} }).exports, o), o.exports);
var bo = (s, o, _) => (No(s, typeof o != "symbol" ? o + "" : o, _), _),
Yo = (s, o, _) => {
if (!o.has(s)) throw TypeError("Cannot " + _);
#!/bin/bash
gt bottom > /dev/null
# Check for Graphite CLI
if [ ! -x "$(command -v gt)" ]; then
echo "This alias requires Graphite CLI (gt), which is not installed. Please install it using the instructions at https://graphite.dev/docs/install-the-cli"
exit 0
fi
# Check for GitHub CLI

I have create a git alias to help those contributing to open source repositories using Graphite on forked commits (feedback on this process is welcome):

genpullmsg = "!f() { \echo \"This is one pull request in a stack... they are all based on top of each other, so the order is important.\"; \
    echo \"\"; \
    echo \"The advantage of this approach is that you are guaranteed no conflicts and reviews should be shorter.\"; \
    echo \"\"; \
    echo \"Review each patch and merge before you move on to the next, this way, nothing will break and the code will be easier to review.\"; \
    echo \"\"; \
    echo \"Start from the bottom (above main) and work your way up the stack until you reach the top.\"; \
{"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