Skip to content

Instantly share code, notes, and snippets.

View rpl's full-sized avatar

Luca Greco rpl

  • Mozilla
  • Lecce, Italy
View GitHub Profile
@aputs
aputs / build-ubuntu-rootfs.sh
Last active February 6, 2019 10:00
shell script for creating ubuntu base image for running inside docker containers
#!/bin/sh
set -x
control_c()
# run if user hits control-c
{
echo -en "\n*** Ouch! Exiting ***\n"
exit $?
}
@campd
campd / writing-actors.md
Last active November 21, 2021 21:13
protocol.js documentation

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;

// Here is a proposal for minimalist JavaScript classes(?), that does not
// introduces any additional syntax to the language, instead it standardizes
// approach already used by majority of JS frameworks today.
// !!! What is a PROBLEM!!!
function Dog(name) {
// Classes are for creating instances, calling them without `new` changes
// behavior, which in majority cases you need to handle, so you end up with
// additional boilerplate.