Skip to content

Instantly share code, notes, and snippets.

View MikeRatcliffe's full-sized avatar
😁

Mike Ratcliffe MikeRatcliffe

😁
View GitHub Profile
@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,
@MikeRatcliffe
MikeRatcliffe / performanceAPI.js
Created July 17, 2017 10:13
Performance API notes
performance.mark("startFoo");
// A time consuming function
foo();
performance.mark("endFoo");
performance.measure("durationFoo", "startFoo", "endFoo");
// Delete all Marks
performance.clearMarks();
// Delete the Measure "durationFoo"
@MikeRatcliffe
MikeRatcliffe / Toolbox.html
Created July 14, 2017 15:43
Toolbox.html
<!-- The following iframe is created by devtools/client/framework/toolbox-hosts.js:82. src="about:blank" -->
<iframe xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="devtools-toolbox-bottom-iframe" height="458" tooltip="aHTMLTooltip" src="about:devtools-toolbox" aria-label="Developer Tools"/>
<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="toolbox-container" flex="1">
<div xmlns="http://www.w3.org/1999/xhtml" id="toolbox-toolbar-mount">
<div data-reactroot="" class="devtools-tabbar">
<!-- The following div is created by devtools/client/framework/components/toolbox-toolbar.js:107 renderToolboxButtons() -->
<div id="toolbox-buttons-start">
BUTTONS...
</div>
</div>
@MikeRatcliffe
MikeRatcliffe / FreeNAS.md
Last active December 2, 2021 23:26 — forked from jacobblock/FreeNAS.md
Ultimate FreeNAS Setup
@MikeRatcliffe
MikeRatcliffe / pia.sh
Last active April 18, 2016 19:41 — forked from dapperfu/pia.sh
#!/bin/tcsh
# Grab user information.
echo "PrivateInternetAccess OpenVPN Setup:"
echo " https://www.privateinternetaccess.com/pages/client-control-panel"
echo " -> PPTP/L2TP/SOCKS Username and Password"
echo -n "User: "
set user = "$<"
echo -n "Pass: "
set pass = "$<"
// -sp-context:browser
Components.utils.import("resource://gre/modules/jsdebugger.jsm");
addDebuggerToGlobal(this);
let win = Services.wm.getMostRecentWindow("navigator:browser");
let dbg = new Debugger(win.gBrowser.selectedBrowser.contentWindow);
let urls = new Set(dbg.findScripts().map(s => s.url));
for (let u of urls) console.log(u);
/* 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/. */
"use strict";
const {Cu, Cc, Ci} = require("chrome");
const events = require("sdk/event/core");
const protocol = require("devtools/server/protocol");
try {
@MikeRatcliffe
MikeRatcliffe / MachBuildOutput.tmLanguage
Created March 26, 2015 13:12
MachBuildOutput.tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>out</string>
</array>
<key>name</key>