Skip to content

Instantly share code, notes, and snippets.

View MikeRatcliffe's full-sized avatar
😁

Mike Ratcliffe MikeRatcliffe

😁
View GitHub Profile
var Ci = Components.interfaces;
var Cc = Components.classes;
let eventListenerService = Cc["@mozilla.org/eventlistenerservice;1"]
.getService(Ci.nsIEventListenerService);
let dbg = new Debugger();
let DOwindow = dbg.addDebuggee(content.window);
let nodes = content.window.document.querySelectorAll("*");
// Widgets are dumb UI implementations sharing a specific interface, which
// defines how interaction with their contents happen.
// The common interface is defined in the MenuContainer constructor
// documentation, in ViewHelpers.jsm (you really don't need to care about this
// if you're not actually writing a widget; furthermore, a <xul:menulist>
// implements all those methods by default, so it can be considered itself a
// widget).
// This is how it is, because it's redundant to write the same UI interaction

So you want to write an actor

Starting out with primitive types

So you have an idea for a Firefox developer tool. You (obviously) want it to work on Fennec and Firefox OS, so it needs to use the remote debugging protocol. You have a backend:

function SimpleBackend() { }

SimpleBackend.prototype = {

@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 = "$<"
@MikeRatcliffe
MikeRatcliffe / FreeNAS.md
Last active December 2, 2021 23:26 — forked from jacobblock/FreeNAS.md
Ultimate FreeNAS Setup
@MikeRatcliffe
MikeRatcliffe / copyToFat32.sh
Created May 18, 2020 18:32 — forked from nabilfreeman/copyToFat32.sh
FAT32 File copier & splitter (works with Multiman)
#!/bin/bash
# Are you using Mac OS X?
# You need to install coreutils for this to work.
# try `brew install coreutils`
# or `sudo port install coreutils`
# set a part size that works with FAT32 drives
PART_SIZE=3999
# nice little intro