Skip to content

Instantly share code, notes, and snippets.

View ExE-Boss's full-sized avatar
➡️
Tabs are the superior indentation codepoint ( https://redd.it/c8drjo )

ExE Boss ExE-Boss

➡️
Tabs are the superior indentation codepoint ( https://redd.it/c8drjo )
View GitHub Profile
@Rich-Harris
Rich-Harris / README.md
Last active February 27, 2025 11:20
Testing array.splice vs array.pop vs set.delete

You have an array. Its sort order doesn't matter. You want to remove an item from this array.

The obvious thing to do would be to use splice:

function remove(array, item) {
  const index = array.indexOf(item);
  array.splice(index, 1);
}
@Rich-Harris
Rich-Harris / wishlist.md
Created November 9, 2018 13:40
Platform wishlist

Platform wishlist

An unconnected list of things it'd be nice to have in the platform. I may add to this over time

SVG 2

Is this ever going to happen? SVG 1.1 is really showing its age, and it feels like something browser vendors have long since stopped caring about

Cmd-F

@Rich-Harris
Rich-Harris / README.md
Created December 20, 2017 15:57
import from async

The fundamental problem with top-level await is that it prevents two unrelated modules doing asynchronous work in parallel, because module evaluation order is strictly deterministic.

What if we provided an escape valve that relaxed that constraint?

// main.js
import foo from async './foo.js';
import bar from async './bar.js';
import baz from './baz.js';
@Elchi3
Elchi3 / compat-old.txt
Last active October 4, 2022 17:36
English pages still using CompatibilityTable.ejs
Web/HTML/Supported_media_formats
Web/Manifest
@brendandahl
brendandahl / xul_overlay_usage.md
Last active February 26, 2024 07:11
XUL Overlay Usage in Firefox

XUL Overlays Usage

There are three ways to use an overlay 1) explicitly, 2) dynamically, and 3) runtime dynamic.

Overlays Used

Explicit

Loaded using <?xul-overlay in xul file.

@choco-bot
choco-bot / Update-AUPackages.md
Last active January 15, 2025 13:41
Update-AUPackages Report #powershell #chocolatey
@f1u77y
f1u77y / export-from-stylish.py
Created May 23, 2017 07:33
Export styles from Stylish for Firefox
#! /usr/bin/env python3
import os.path
import glob
import sqlite3
import json
def main():
styles_glob = os.path.expanduser('~/.mozilla/firefox/*.default/stylish.sqlite')
styles_path = glob.glob(styles_glob)[0]
@notjuliee
notjuliee / nosteponcss.js
Created May 8, 2017 03:41
No step on CSS
// ==UserScript==
// @name RedaddCSS
// @namespace com.digitalfishfun.nosteponcss
// @version 1
// @grant none
// @include https://reddit.com/r/*
// ==/UserScript==
const nosteponcss_instructions = `
USAGE:
@domenic
domenic / redirecting-github-pages.md
Created February 10, 2017 19:28
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution

@Yoric
Yoric / migration.md
Last active July 13, 2018 23:22 — forked from jonco3/migration.md
Migrating from JSM to ES6 modules

This document shows a possible migration path from Cu.import() to ES modules for the code of Firefox.

Objectives

Use standard JavaScript, to simplify the use of third-party tools (e.g. static analysis, code rewriting, smart IDEs) and onboarding of new developers.

Requirements

  1. Preserve current JSM semantics where multiple imports of a single module from different globals results in a single module instance that lives in a separate global to the importer.
  2. Add-ons and Thunderbird should not be affected by the migration.