Skip to content

Instantly share code, notes, and snippets.

@juliandescottes
juliandescottes / gist:d36d396ec163f4d9dd4bef9e37def2fd
Created September 25, 2016 22:22
getCol for dszabo perf PR
var getCol = (x, y) => {
return pskl.utils.intToColor(pskl.app.piskelController.getLayerAt(0).frames[0].getPixel(x, y));
};

about:debugging-new

What is about:debugging-new

The purpose of about:debugging is to be a debugging hub to start inspecting your addons, processes, tabs and processes. This new version of about:debugging will also allow you to debug remote devices (Firefox for Android on a smartphone). The user should be able to connect either via USB or WiFi. This solution is supposed to replace the various existing remote debugging solutions available in Firefox DevTools, WebIDE and the Connect page.

To try about:debugging-new, the preference devtools.aboutdebugging.new-enabled needs to be set to true in about:config. After that, the UI is available by going to about:debugging.

Technical overview

The about:debugging-new UI is built using React and Redux. The various React/Redux files should be organized as follows:

@juliandescottes
juliandescottes / debugger_release_metrics.js
Last active April 26, 2024 22:58
Debugger release metrics
"use strict";
(function () {
const BUGZILLA_API_URL = "https://bugzilla.mozilla.org";
const BUG_URL = BUGZILLA_API_URL + "/rest/bug/${BUG_ID}";
const COMMENTS_URL = BUGZILLA_API_URL + "/rest/bug/${BUG_ID}/comment";
const HISTORY_URL = BUGZILLA_API_URL + "/rest/bug/${BUG_ID}/history";
const TRY_URL = "https://treeherder.mozilla.org";
@juliandescottes
juliandescottes / get-test-list.js
Created January 4, 2018 17:39
Small script to get the list of tests that were executed in a try run
async function getTestList(logUrl) {
let log = await fetch(logUrl);
let logText = await log.text();
let lines = logText.split("\n");
lines = lines
.filter(l => l.includes("TEST-START"))
.filter(l => !l.includes("Shutdown"))
.map(l => l.match(/TEST-START \| ([^\s]+)/)[1]);
console.log(lines);
@juliandescottes
juliandescottes / debugger-html_create-compare-url.js
Created January 3, 2018 10:56
Create debugger html compare URL
async function createCompareURL(attachmentUrl) {
let attachment = await fetch(attachmentUrl);
let patch = await attachment.text();
let oldHash = patch.match(/\-Taken from upstream commit: ([a-f0-9]+)\n/)[1];
let newHash = patch.match(/\+Taken from upstream commit: ([a-f0-9]+)\n/)[1];
let compareUrl =
`https://github.com/devtools-html/debugger.html/compare/${oldHash}...${newHash}`;
console.log(compareUrl);
}
@dhh
dhh / linux-setup.sh
Last active April 26, 2024 22:57
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@jacobw
jacobw / dev4.yaml
Created April 26, 2024 22:40
ESPHOME BTHome
esphome:
name: dev4
friendly_name: BTHome dev4
interval:
- interval: 5s
startup_delay: 1s
then:
- lambda: |-
// Update sensor then wait
@juliandescottes
juliandescottes / hack-devtools-57-outline.md
Last active April 26, 2024 22:57
Hacks post 57 outline

INTRO

GENERAL

  • new colors, photon update

INSPECTOR

  • Layout panel, grid inspector improvements
  • Layout panel, box model information
  • toggle class elements
@juliandescottes
juliandescottes / devtools_addon_tests.txt
Created August 9, 2017 13:48
DevTools as System Addon tests
(DSA = DevTools as System Addon)
Setup: The version of DevTools as system addon that I am testing is:
- the patches from ship as system addon https://bugzilla.mozilla.org/show_bug.cgi?id=1369801
- the patches from move key-shortcut https://bugzilla.mozilla.org/show_bug.cgi?id=1386616
- the "workaround" from system addons sideloaded don't start https://bugzilla.mozilla.org/show_bug.cgi?id=1386295
Test scenarios
- S1:
1 - Open Firefox with DSA with a clean profile