Instantly share code, notes, and snippets.

View blockstack.proof
Verifying my Blockstack ID is secured with the address 1BYXhnj3VhU8ndrdsbn329Y2TEHxEMn3gt https://explorer.blockstack.org/address/1BYXhnj3VhU8ndrdsbn329Y2TEHxEMn3gt
View popup.js
var extension = {id:"7cc71529-5b04-d84b-8473-aca5e6791051"}
var panel = document.createXULElement("panel")
panel.classList.add("popup-notification-panel");
panel.setAttribute("followanchor", true)
panel.setAttribute("type", "arrow")
popupnotification = document.createXULElement("popupnotification")
popupnotification.setAttribute("label", "");
popupnotification.setAttribute("name", "label name");
View task.js
/* @flow strict */
type Future<x, a> = () => Task<x, a>
type Task<x, a> = {
@@iterator(): $Iterator<empty, a, empty>;
next(empty): IteratorResult<empty, a>;
return(a): IteratorResult<empty, a>;
throw(x): IteratorResult<empty, a>;
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View example.js
const refs = new WeakMap()
function requestSomeAPI() {
const api = Cu.cloneInto({
doPrivilegedThing() {
refs.get(this).doPrivilegedThing()
}
}, unprivilegedContext)
refs.set(api, new Privileged())
return api
}
View dgram-adapter.js
// @flow
const EventEmitter = require("events")
const Buffer = require("buffer").Buffer
module.exports = UPDSocket => {
/*::
interface SocketOptions {
type: 'udp4' | 'udp6';
reuseAddr?: boolean;
View API.js
this.MyAPI = class extends ExtensionAPI {
getAPI(context) {
const sandbox = Cu.Sandbox(context.cloneScope, {
sameZoneAs: context.cloneScope,
wantComponents: false,
wantXrays: false
})
const init = Cu.evalInSandbox(function() {
class MyThing {
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

View protocol.json
{
"namespace": "protocol",
"types": [
{
"$ref": "ProtocolHandler",
"type": "function",
"description": "Protocol handler",
"async": false,
"parameters": [
{
View Marks.js
import type {
Transaction,
MarkType,
Selection,
ResolvedPos,
Mark,
Node
} from "prosemirror-state"
import { Decoration, DecorationSet } from "prosemirror-view"