Skip to content

Instantly share code, notes, and snippets.

View robcee's full-sized avatar
🌶️
one million scovilles

Rob Campbell robcee

🌶️
one million scovilles
View GitHub Profile
// open a web console
let {devtools} = Cu.import("resource://gre/modules/devtools/Loader.jsm", {});
// console.profile();
let targét = devtools.TargetFactory.forTab(gBrowser.selectedTab);
let startTime = Date.now();
let endTime;
gDevTools.showToolbox(targét, "inspector").then(() => {
/* 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/. */
var __SCRATCHPAD__ = !(typeof(window) == "undefined");
if (__SCRATCHPAD__ && (typeof(window.gBrowser) == "undefined")) {
throw new Error("Must be run in a browser scratchpad.");
}
// If we're developing in scratchpad, shutdown the previous run
/*
* This is a JavaScript Scratchpad.
*
* Enter some JavaScript, then Right Click or choose from the Execute Menu:
* 1. Run to evaluate the selected text (Cmd-R),
* 2. Inspect to bring up an Object Inspector on the result (Cmd-I), or,
* 3. Display to insert the result in a comment after the selection. (Cmd-L)
*/
@robcee
robcee / .mozconfig-osx-10.6
Created March 25, 2011 18:53
Mac .mozconfig file
# This file specifies the build flags for Firefox. You can use it by adding:
# . $topsrcdir/browser/config/mozconfig
# to the top of your mozconfig file.
# export MOZ_DEBUG_SYMBOLS=1
export CFLAGS="-gdwarf-2"
export CXXFLAGS="-gdwarf-2"
ac_add_options --enable-application=browser
ac_add_options --enable-optimize
#!/bin/bash
# $Author: Mihai Sucan <mihai.sucan@gmail.com>$
# $Date: 2011-05-02 21:10:35 $
# usage:
# moztests -hud
# runs the HUDService tests
# moztests -ws
# runs the Workspace tests
@robcee
robcee / webconsole-position-probe.patch
Created July 12, 2011 17:18
webconsole-position-probe
diff --git a/toolkit/components/telemetry/TelemetryPing.js b/toolkit/components/telemetry/TelemetryPing.js
--- a/toolkit/components/telemetry/TelemetryPing.js
+++ b/toolkit/components/telemetry/TelemetryPing.js
@@ -138,16 +138,17 @@ function getMetadata(reason) {
let ret = {
reason: reason,
OS: ai.OS,
appID: ai.ID,
appVersion: ai.version,
appName: ai.name,
@robcee
robcee / tilt.prettified.js
Created September 9, 2011 15:59
Tilt reprettified
'use strict';
var f = void 0,
k = null;
function aa() {
return function() {}
}
function ca(a) {
return function(b) {
this[a] = b
}
@robcee
robcee / gist:2437511
Created April 21, 2012 14:51
Sample BrowserID + Nginx + Proxy setup (can work for node, django, flask, etc)
upstream gunicorn_frontends {
# We define the binding of the gunicorn web server
server 127.0.0.1:8000;
}
# we need to redirect www since browserid thinks www and non-www are different
server {
listen 80;
server_name www.yourdomain.com;
rewrite ^ http://yourdomain.com$uri permanent;
@robcee
robcee / .hgrc
Created April 27, 2012 16:04
.hgrc
[defaults]
diff = -p -U 8
qdiff = -p -U 8
qnew = -U
qseries = -s
[paths]
fx-team = ssh://hg.mozilla.org/integration/fx-team/
mozilla-central = ssh://hg.mozilla.org/mozilla-central/
m-c = ssh://hg.mozilla.org/mozilla-central/
@robcee
robcee / .mozconfig
Created April 27, 2012 16:19
.mozconfig
# This file specifies the build flags for Firefox. You can use it by adding:
# . $topsrcdir/browser/config/mozconfig
# to the top of your mozconfig file.
mk_add_options AUTOCONF=/usr/local/Cellar/autoconf213/2.13/bin/autoconf213
mk_add_options MOZ_MAKE_FLAGS="-s -j4"
ac_add_options --enable-application=browser
ac_add_options --enable-optimize
#ac_add_options --enable-debug