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
@robcee
robcee / git.config
Created January 18, 2023 18:05
some useful git aliases and config options
alias.undo=reset --soft HEAD^
alias.stash-all=stash save --include-untracked
alias.glog=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
alias.dlog=log --oneline
alias.edconfig=config --global -e
alias.co=checkout
alias.cb=checkout -b
alias.stat=status
core.autocrlf=false
@robcee
robcee / cbc-mp3.m3u
Created August 26, 2022 16:16 — forked from nevillepark/README.md
CBC MP3 stream urls
#EXTM3U
#PLAYLIST:CBC Radio Streams
#EXTINF:-1,CBC Music (Atlantic)
http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_hfx
#EXTINF:-1,CBC Music (Central)
http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_wpg
@robcee
robcee / git_changelog.bash
Created October 8, 2021 15:18
Script to generate changelogs from git commit record
#!/bin/bash
#
# fail if any commands fails
set -e
# debug log
set -x
if [ ! -e ${env.APP_TAG_NAME} ]
then
echo "${env.APP_TAG_NAME} not found. Exiting..."
/**
* pinchy preferences.
*
* Execute in a Browser Scratchpad.
* 1. Open Firefox Developer Tools (cmd-opt-i)
* 2. Open Settings (gear icon)
* 3. Check "Enable browser chrome and add-on debugging toolboxes"
* and "Enable remote debugging" in "Advanced Settings"
* 4. Maybe restart the browser
* 5. Open Scratchpad (shift-F4)
@robcee
robcee / keybase.md
Last active May 25, 2017 13:00
keybase.io proof

Keybase proof

I hereby claim:

  • I am robcee on github.
  • I am robcee (https://keybase.io/robcee) on keybase.
  • I have a public key ASAzKAG5vptxYxAV21g2bwR0P0r4vtl5VZku8cCaZZPhkQo

To claim this, I am signing this object:

/*
* 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)
*/
/* 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
// 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(() => {

Writing an Actor

A Simple Hello World

Here's a simple Hello World actor. It is a global actor (not associated with a given browser tab).

let protocol = require("devtools/server/protocol");

let {method, Arg, Option, RetVal} = protocol;

This interface is partly implemented in Firefox Nightly builds. Some parts are not implemented, some APIs may yet change, and anything marked "(future plan)" is a long way off. You can [https://github.com/jimblandy/DebuggerDocs fork this specification on github] to draft and discuss revisions.

The Debugger constructor makes objects with methods for debugging code running in global objects in other compartments. Given a Debugger instance, you can:

  • add debuggee global objects to its purview using its addDebuggee method;
  • request notification of basic debugging events like stack frame entry and debugger statement execution by providing appropriate handler functions;
  • set breakpoints in scripts;
  • set watchpoints on objects and their properties;
  • examine the debuggee's stack frames and lexical enviroments; inspect and manipulate its objects;