Skip to content

Instantly share code, notes, and snippets.

View MikeRatcliffe's full-sized avatar
😁

Mike Ratcliffe MikeRatcliffe

😁
View GitHub Profile
@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>
@MikeRatcliffe
MikeRatcliffe / MozillaTest.tmLanguage
Created March 26, 2015 13:09
MozillaTest.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>test</string>
</array>
<key>name</key>
<string>Mozilla Test Output</string>
<?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>zzz</string>
</array>
<key>name</key>
@MikeRatcliffe
MikeRatcliffe / gist:23bdfb9f9cc061c73366
Created March 10, 2015 14:48
Storage Actor Message Passing
diff --git a/toolkit/devtools/server/actors/childtab.js b/toolkit/devtools/server/actors/childtab.js
--- a/toolkit/devtools/server/actors/childtab.js
+++ b/toolkit/devtools/server/actors/childtab.js
@@ -24,16 +24,18 @@ let { TabActor } = require("devtools/ser
*/
function ContentActor(connection, chromeGlobal)
{
this._chromeGlobal = chromeGlobal;
TabActor.call(this, connection, chromeGlobal);
this.traits.reconfigure = false;