Skip to content

Instantly share code, notes, and snippets.

View kt3k's full-sized avatar

Yoshiya Hinosawa kt3k

View GitHub Profile
This file has been truncated, but you can view the full file.
fn main() {
let mut v = Vec::<i32>::new();
let mut push = &mut v;
let mut push_wrap = &mut push;
let _ = &mut push;
let _ = &mut push_wrap;
}
This file has been truncated, but you can view the full file.
{
"sequential/test-async-wrap-getasyncid.js": [
false,
{
"code": 1,
"stderr": "error: unexpected argument '--expose-gc' found\n\n tip: to pass '--expose-gc' as a value, use '-- --expose-gc'\n\nUsage: deno run [OPTIONS] [SCRIPT_ARG]...\n\n"
}
],
"sequential/test-buffer-creation-regression.js": [
All tests 1229/3936 (31.22%):
Result by categories (122):
abortcontroller 0/2 (0.00%)
FAIL parallel/test-abortcontroller-internal.js
FAIL parallel/test-abortcontroller.js
assert 1/17 (5.88%)
PASS parallel/test-assert-async.js
FAIL parallel/test-assert-builtins-not-read-from-filesystem.js
FAIL parallel/test-assert-calltracker-calls.js
FAIL parallel/test-assert-calltracker-getCalls.js
@kt3k
kt3k / make_fetch_happen.js
Last active January 27, 2025 05:42
sock-init-workaround related edge cases. Each script represents independent edge cases around sock-init-workaround
import fetch from "npm:make-fetch-happen";
const resp = await fetch("http://example.com");
console.log(await resp.text());
let counter = 0;
const registry = new FinalizationRegistry(() => {
console.log(`Array gets garbage collected at ${counter}`);
});
(function allocateMemory() {
// Allocate 50000 functions — a lot of memory!
registry.register(Array.from({ length: 50000 }, () => () => {}));
if (counter > 1000) {
console.log("Main job ends");
abortable
abortableAsyncIterable
abortablePromise
accepts
acceptsEncodings
acceptsLanguages
afterAll
afterEach
aggregateGroups
ascend
@kt3k
kt3k / test.md
Last active August 23, 2023 11:47

$1

$1$

$$1$$

  graph TD;
      A-->B;
 A--&gt;C;
ACL [RFC3744, Section 8.1]
BASELINE-CONTROL [RFC3253, Section 12.6]
BIND [RFC5842, Section 4]
CHECKIN [RFC3253, Section 4.4, Section 9.4]
CHECKOUT [RFC3253, Section 4.3, Section 8.8]
CONNECT [RFC9110, Section 9.3.6]
COPY [RFC4918, Section 9.8]
DELETE [RFC9110, Section 9.3.5]
GET [RFC9110, Section 9.3.1]
HEAD [RFC9110, Section 9.3.2]
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String