Skip to content

Instantly share code, notes, and snippets.

View bartlomieju's full-sized avatar
🦕

Bartek Iwańczuk bartlomieju

🦕
View GitHub Profile
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./src/base.ts":
/*!*********************!*\
!*** ./src/base.ts ***!
\*********************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
addEventListener("fetch", (event) => {
new ArrayBuffer(1 << 30);
});
addEventListener("fetch", (event) => {
while (true) {}
});
addEventListener("fetch", (event) => {
throw new Error("boom!");
});
❯ cargo run -- task
Compiling deno v1.19.2 (/Users/ib/dev/deno/cli)
Finished dev [unoptimized + debuginfo] target(s) in 20.58s
Running `target/debug/deno task`
Available tasks:
- async
sleep 1 && echo 2 &
- boolean_list
echo 1 && false || echo 2
- env_var_substitution
jupyter notebook
[I 2021-12-09 17:20:32.804 LabApp] JupyterLab extension loaded from /usr/local/Cellar/jupyterlab/3.2.4/libexec/lib/python3.9/site-packages/jupyterlab
[I 2021-12-09 17:20:32.804 LabApp] JupyterLab application directory is /usr/local/Cellar/jupyterlab/3.2.4/libexec/share/jupyter/lab
[I 17:20:32.813 NotebookApp] Serving notebooks from local directory: /Users/biwanczuk/dev/ideno
[I 17:20:32.813 NotebookApp] Jupyter Notebook 6.4.6 is running at:
[I 17:20:32.813 NotebookApp] http://localhost:8888/?token=6a1b4c6d4743e5dff339982ec80ac39e758c0dd3b7e7cded
[I 17:20:32.813 NotebookApp] or http://127.0.0.1:8888/?token=6a1b4c6d4743e5dff339982ec80ac39e758c0dd3b7e7cded
[I 17:20:32.813 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 17:20:32.823 NotebookApp]
@bartlomieju
bartlomieju / inspector.js
Last active December 7, 2021 00:35
Demonstrate event loop hang if "Runtime.runIfWaitingForDebugger" is not called after connecting to Deno inspector. Forked from https://gist.github.com/evanwashere/04cfa233f613343e1c9d6fb72cfd628c
class Emitter {
#on = Object.create(null);
#once = Object.create(null);
on(n, fn) { (this.#on[n] ?? (this.#on[n] = [])).push(fn); }
once(n, fn) { (this.#once[n] ?? (this.#once[n] = [])).push(fn); }
emit(n, ...args) { this.#on[n]?.forEach(_ => _(...args)); if (this.#once[n]) this.#once[n] = (this.#once[n].forEach(_ => _(...args)), undefined); }
off(n, fn) { if (!fn) (delete this.#on[n], delete this.#once[n]); else { let o = this.#on[n]?.indexOf(fn) ?? -1; if (o !== -1) this.#on[n].splice(o, 1); o = this.#once[n]?.indexOf(fn) ?? -1; if (o !== -1) this.#once[n].splice(o, 1); } }
}
DEBUG RS - deno::file_fetcher:545 - FileFetcher::fetch() - specifier: file:///Users/biwanczuk/dev/manual/.github/import_map.json
DEBUG RS - deno_runtime::permissions:51 - ⚠️️ Granted read access to "/Users/biwanczuk/dev/manual/.github/import_map.json"
DEBUG RS - deno::file_fetcher:545 - FileFetcher::fetch() - specifier: file:///Users/biwanczuk/dev/manual/README.md
DEBUG RS - deno_runtime::permissions:51 - ⚠️️ Granted read access to "/Users/biwanczuk/dev/manual/README.md"
DEBUG RS - deno::file_fetcher:545 - FileFetcher::fetch() - specifier: file:///Users/biwanczuk/dev/manual/continuous_integration.md
DEBUG RS - deno_runtime::permissions:51 - ⚠️️ Granted read access to "/Users/biwanczuk/dev/manual/continuous_integration.md"
DEBUG RS - deno::file_fetcher:545 - FileFetcher::fetch() - specifier: file:///Users/biwanczuk/dev/manual/contributing.md
DEBUG RS - deno_runtime::permissions:51 - ⚠️️ Granted read access to "/Users/biwanczuk/dev/manual/contributing.md"
DEBUG RS - deno::file_fetcher:545 - FileFetcher::fet
let loader = Rc::new(RemoteLoader {});
let mut isolate = EsIsolate::new(loader, StartupData::None, false);
let mod_id = isolate.load_module(&specifier, Some(source_code)).await?;
isolate.mod_evaluate(mod_id)?;
{"/npm:tough-cookie@3?dew":"12f344e27b9aa0c546fe4024c7d0a2c1df2a739bccd3a28c6aee58ec358a3969","/npm:request@2?dew":"bd8db8a82ddf8c4f17ef069b20e06eb7e9ff38246309c56f4aa1be04139838b0","/npm:asn1@0.2.4/lib/ber/errors.dew.js":"2cd0e8d7366a0a438d01fc7d3d490458e0b60a892c2434129bb3723f951329df","/npm:jsdom@16.2.0/lib/jsdom/living/domparsing/parse5-adapter-serialization.dew.js":"1061cc61a18e2a50693160adda84181f568ac360d72932428839e6def70f9da1","/npm:jsdom@16.2.0/lib/jsdom/living/generated/FileList.dew.js":"b9f55ccc0ba4dc48d3791b6f217c2b18c42a66cd523cbe7a49a491e00d3af018","/npm:decimal.js@10?dew":"76ae50f5ca5145ceeec3174ca28b81b770e83c2bdf9d13b4c953e7696edc9c1c","/npm:jsdom@16.2.0/lib/jsdom/living/generated/PopStateEvent.dew.js":"dc8aa59e7433f0975f72095856a73cfa7a000c9ba256306368e99e42fe77a245","/npm:ecc-jsbn@0.1.2/lib/sec.dew.js":"470b3aae4518a04c8cb91110082c3fbc1419c2b9021ece833b90ad8c37081102","/npm:jsdom@16.2.0/lib/jsdom/living/window/Location-impl.dew.js":"f1ca3a20f73fecfb0e1eecca1a74d11e2e6135e98388a04f951e48338