Skip to content

Instantly share code, notes, and snippets.

@eeejay
eeejay / blah.sh
Created December 11, 2019 22:28
Re-add Fedora in EFI boot
mount /dev/dm-5 /mnt
mount /dev/nvme0n1p5 /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot/efi
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
chroot /mnt
# in chroot:
# grep efibootmgr /var/log/anaconda/program.log
@eeejay
eeejay / install_addon.js
Created November 16, 2020 17:31
Sideload addon in Firefox for Android
// In main process JS console:
const { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm")
AddonManager.getInstallForURL(XPI_URL).then(r => r.install())
'use strict';
let userAgentString = navigator.userAgent;
// Detect Chrome
let chromeAgent = userAgentString.indexOf("Chrome") > -1;
let safariAgent = userAgentString.indexOf("Safari") > -1 && !chromeAgent ? true : false;
Element.prototype.isInvisible = function() {
if (this.style.display == 'none') return true;
if (getComputedStyle(this).display === 'none') return true;
if (this.parentNode.isInvisible) return this.parentNode.isInvisible();
@eeejay
eeejay / .gitignore
Last active September 7, 2022 16:53
SVG source for Mozilla's accessibility team sticker
*.png
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
import pyax
import time
import psutil
URL = "https://en.wikipedia.org/wiki/World_War_I"
# URL = "https://html.spec.whatwg.org/"
FIREFOX_BINARY = "/Applications/Firefox Nightly.app/Contents/MacOS/firefox-bin"