This is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.
- opencv
- scrot
- findimage
- xdotool
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>imgur oauth</title> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<script> | |
$(function () { | |
var extractToken = function(hash) { |
import fs from "fs"; | |
import puppeteer from "puppeteer"; | |
export const Q = (userDataDir, tokenHost) => { | |
const getToken3 = (headless) => | |
new Promise(async (resolve, reject) => { | |
const browser = await puppeteer.launch({ | |
headless, | |
userDataDir, | |
}); |
#!/usr/bin/env bash | |
echo | |
echo "Arch Linux in QEMU with love from eirikb" | |
echo | |
set -x | |
TARGET=ArchLinuxARM-rpi-armv7-latest.tar.gz | |
wget "http://os.archlinuxarm.org/os/$TARGET" |
const path = require('path'); | |
const cwd = process.cwd(); | |
module.exports = { | |
"includePaths": [ | |
path.resolve(cwd, 'node_modules'), | |
path.resolve(cwd, 'src') | |
] | |
}; |
wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz | |
qemu-img create root.img 32G | |
mkfs.ext4 root.img | |
mkdir root | |
sudo mount root.img root | |
sudo bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C root | |
sudo cp -r root/boot . | |
sudo umount root | |
qemu-system-aarch64 -M virt -cpu cortex-a72 -kernel boot/Image -hda root.img -append "root=/dev/vda rw" |
# az login | |
# check: az resource list | grep <your azure function name> | |
# If not available you also need to change subscription | |
# az account set --subscritipon <sub id, find this in portal, or by az account list> | |
webAppName="<your azure functions name here>" | |
spId=$(az resource list -n $webAppName --query [*].identity.principalId --out tsv) | |
graphResourceId=$(az ad sp list --display-name "Microsoft Graph" --query [0].id --out tsv) |
const req = require.context('./components/', true, /\.(js|vue)$/i); | |
req.keys().map(key => { | |
const name = key.match(/\w+/)[0]; | |
return Vue.component(name, req(key)) | |
}); |
const http = require("http"); | |
const https = require("https"); | |
const fs = require("fs"); | |
const auth = `Basic ${Buffer.from( | |
process.env.PROXY_USER + ":" + process.env.PROXY_PASS | |
).toString("base64")}`; | |
function proxy(id, url, method, headers, data, origRes, withCa) { | |
const parts = url.split("/").slice(2); | |
return new Promise((resolve, reject) => { |
This is a bash script, as an example, on how to do click-testing GUI based on finding components based on how they look.
const fs = require('fs'); | |
const os = require('os'); | |
const path = `${os.homedir()}/.mozilla/firefox`; | |
for (const dir of fs.readdirSync(path)) { | |
const file = [path, dir, 'containers.json'].join('/'); | |
if (fs.existsSync(file)) { | |
console.log('Fixing', file); | |
const containers = require(file); |