Install R
https://cran.r-project.org/bin/
Setup
chmod a+x plot.R| #!/usr/bin/env node | |
| import { chromium } from "playwright"; | |
| import { readFileSync } from "node:fs"; | |
| import { once } from "node:events"; | |
| async function main() { | |
| const browser = await chromium.launch({ headless: false }); | |
| try { | |
| const cookies = await readCookies("cookies.json"); | 
| /* --- Userland --- */ | |
| function makeUpdate(i) { | |
| return function someUpdate() { | |
| console.trace(`completeUpdate: update ${i}`); | |
| }; | |
| } | |
| function businessLogic() { | |
| scheduler.scheduleTask("foo", [makeUpdate(1), makeUpdate(2), makeUpdate(3)]); | 
| /* --- Userland --- */ | |
| function someTask() { | |
| console.trace("completeWork: someTask"); | |
| } | |
| function someOtherTask() { | |
| console.trace("completeWork: someOtherTask"); | |
| } | 
| /* eslint-env node */ | |
| const { Session } = require('inspector'); | |
| const fs = require('fs'); | |
| const captureExit = require('capture-exit'); | |
| captureExit.captureExit(); | |
| /** @param exitPromise {Promise<void>} */ | |
| async function runProfile(exitPromise) { | 
| function createQueue() { | |
| let queue = []; | |
| let i = 0; | |
| let len = 0; | |
| return [ | |
| (fn) => (queue[len++] = fn), | |
| () => { | |
| try { | |
| for (; i < len; i++) { | |
| const fn = queue[i]; | 
| var assert = require('assert'); | |
| global.KEYS = JSON.parse(require('fs').readFileSync('bindings.json','utf8')); | |
| global.RESULT = false; | |
| global.CHARAT = function (key) { | |
| var l = key.length; | |
| return l > 7 && | |
| key.charAt(l - 7) === 'B' && | |
| key.charAt(l - 6) === 'i' && | |
| key.charAt(l - 5) === 'n' && | 
Install R
https://cran.r-project.org/bin/
Setup
chmod a+x plot.RThis serves as a base canary gist for @rwjblue.
A few useful links for the main source/gist are:
| import Ember from 'ember'; | |
| import { module } from 'qunit'; | |
| import startApp from 'livin/tests/helpers/start-app'; | |
| import OnboardPage from 'livin/tests/helpers/page-objects/onboard'; | |
| import { test } from 'qunit'; | |
| const { run } = Ember; | |
| let application; | |
| module('Acceptance | onboard', { | 
| This requires `brew install jq` which is a command json query. | |
| I got this from @krisselden |