This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In main process JS console: | |
const { AddonManager } = ChromeUtils.import("resource://gre/modules/AddonManager.jsm") | |
AddonManager.getInstallForURL(XPI_URL).then(r => r.install()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, user-scalable=no" /> | |
<style> | |
html { | |
height: 100%; | |
width: 100%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function showClientCoords(win, x, y, timeout=1000) { | |
let d = win.document.createElement("div"); | |
d.style.width = "10px"; | |
d.style.height = "10px"; | |
d.style.borderRadius = "5px"; | |
d.style.backgroundColor = "red"; | |
d.style.position = "fixed"; | |
d.style.top = (y + 5) + "px"; | |
d.style.left = (x + 5) + "px"; | |
win.document.documentElement.appendChild(d); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Good Example</title> | |
<style> | |
body { | |
margin: 50px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DOMContentLoaded is fired once the document has been loaded and parsed, | |
// but without waiting for other external resources to load (css/images/etc) | |
// That makes the app more responsive and perceived as faster. | |
// https://developer.mozilla.org/Web/Reference/Events/DOMContentLoaded | |
function getMessages() { | |
return new Promise((resolve, reject) => { | |
var x = new XMLHttpRequest(); | |
var params = "m5_csrf_tkn=" + document.querySelector("meta[name=csrf_id]").content; | |
console.log(params); |
NewerOlder