Playwright step started: const { signIn } = authContext;
Playwright step started at Point:Playwright: await signIn('[email protected]');
Playwright step started: const { signIn } = authContext;
Playwright step started at Point:Playwright: await signIn('[email protected]');
| /** ########################################################################### | |
| * Frontend Queries | |
| * ##########################################################################*/ | |
| const getPauseId = window.getPauseId = () => { | |
| const state = app.store.getState(); | |
| const pauseId = state?.pause?.id; | |
| if (!pauseId) { | |
| throw new Error(`Pause required (but not found) for snippet`); | |
| } |
| /** | |
| * Fixes the "muted errors problem" of Promise.all. | |
| * | |
| * {@link betterPromiseAll} | |
| * @see https://gist.github.com/Domiii/41c1dc504025e789fd8741f78d3ac528 | |
| * @see https://dev.to/domiii/a-solution-to-the-deep-flaws-of-promiseall-1ldh | |
| */ | |
| async function betterPromiseAll(promises) { | |
| const results = await Promise.allSettled(promises); | |
| const values = []; |
New kind of mini-/browser-game with a serious angle: "Porcupine Defender"!
When it comes to defending Taiwan, recent surveys show that most people think that they need to rely on the US once Winnie the Poo attacks. Many feel that they are helpless on their own, when facing the threat of an invasion. However, this way of thinking is not only a fallacy, but even more so, a good way to lose your personal freedom and democracy to a hostile force.
The idea that Taiwan can and must (to a large extent) defend itself is well established. Two buzzwords often arise in that context: (1) "asymetric warfare" and (2) the porcupine doctrine. The idea is simple: in order to defend itself, Taiwan does not need to "win a war" against a superior force, it only needs to make an attack sufficiently costly/difficult and/or dangerous (https://en.wikipedia.org/wiki/Republic_of_China_Armed_Forces#Strategy).
"Porcupine Defender" visualizes how that is possible. It visualizes (among other things), Taiwan's primary military assets, h
Based on:
yarn add "@reduxjs/toolkit react-redux
cra-template-redux| /** | |
| * @file This config is supposed to be usable for many webpack build tasks, including `webpack/examples`. | |
| * The following setup steps are for local development build on Windows. | |
| * | |
| * Setup: | |
| yarn add --dev webpack-node-externals webpack webpack-cli | |
| mkdir ..\..\node_modules\@dbux | |
| mklink /J ..\..\node_modules\@dbux\babel-plugin ..\..\..\dbux\dbux-babel-plugin | |
| mklink /J ..\..\node_modules\@dbux\runtime ..\..\..\dbux\dbux-runtime |
| /** | |
| * @file Workaround (conversion script) to address lack of proper mocha JSON output. | |
| * | |
| * @see https://gist.github.com/Domiii/ff89e1427ee51193721abdbb08842e58 | |
| * @see https://stackoverflow.com/questions/41380137/list-all-mocha-tests-without-executing-them/68829700#68829700 | |
| */ | |
| const fs = require('fs'); | |
| const path = require('path'); |
| /* trace console logging */ | |
| (function __traceConsole__() { | |
| Object.entries(console) | |
| .forEach(([name, fn]) => { | |
| // console.debug(name); | |
| if (!require('lodash/isFunction')(fn)) { | |
| return; | |
| } | |
| console[name] = (...args) => { | |
| const stack = new Error().stack.split('\n').join('\n '); |
| // ########################################################################### | |
| // util | |
| // ########################################################################### | |
| const N = 100e6; | |
| // async function sleep(ms) { return new Promise(r => setTimeout(r, ms)); } | |
| /** | |
| * |
| /** | |
| * Gets the line at given offset in s, as well as `nLines` lines below and above. | |
| * If a line is very long (e.g. in bundled/obfuscated files), i.e. if it exceeds `maxChars`, get at most `maxChars` more in each direction | |
| */ | |
| function getLinesAroundOffset(s, offset, nLines = 1, maxChars = 200) { | |
| let start = offset - 1; | |
| for (let i = 0; i < nLines; ++i) { | |
| const newIdx = s.lastIndexOf('\n', start) - 1; | |
| if (Math.abs(start - newIdx) > maxChars) { |