Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
Internal application error: TypeError: cannot read headers: request closed | |
at Object.get headerList (ext:deno_fetch/23_request.js:115:17) | |
at Request.request.<computed> (ext:deno_fetch/23_request.js:565:60) | |
at Request.get [headers] (ext:deno_fetch/23_request.js:252:46) | |
at Request.get headers (ext:deno_fetch/23_request.js:452:16) | |
at NativeRequest.get headers (https://deno.land/x/oak@v12.5.0/http_server_native_request.ts:72:26) | |
at new Request (https://deno.land/x/oak@v12.5.0/request.ts:150:21) | |
at new Context (https://deno.land/x/oak@v12.5.0/context.ts:172:20) | |
at Application.#handleRequest (https://deno.land/x/oak@v12.5.0/application.ts:450:17) | |
at Application.listen (https://deno.land/x/oak@v12.5.0/application.ts:656:28) |
defmodule Example.Application do | |
@moduledoc false | |
use Application | |
def start(_type, _args) do | |
children = [ | |
Example.Repo, | |
ExampleWeb.Telemetry, | |
{Phoenix.PubSub, name: Example.PubSub}, |
import { effect } from '@preact/signals-core' | |
export function effectWithPreviousValue<T>( | |
initialValue: T, | |
compute: (prev: T) => T | |
): () => void { | |
let prev = initialValue | |
return effect(() => { | |
prev = compute(prev) |
import { signal } from '@preact/signals' | |
export type ComplexSignal<T> = { | |
value: T | |
peek: T | |
subscribe: (cb: (t: T) => void) => () => void | |
update: (cb: (t: T) => void) => void | |
} | |
export function complexSignal<T>(initialValue: T): ComplexSignal<T> { |
# curry the write function | |
write_data = &(File.write!("./assets/slides.json", &1)) | |
Path.wildcard("./assets/slides/*.svg") | |
|> Enum.sort() | |
|> Enum.map(&Path.basename/1) | |
|> Enum.with_index(1) | |
|> Enum.map(fn {file, index} -> {file, Path.basename(file, ".svg"), index} end) | |
|> Enum.map(fn {file, name, index} -> | |
%{ |
document.querySelectorAll('button[aria-label="Toggle diff contents"]').forEach(b => b.click()) |
const bytes = await Deno.readFile(new URL('./thumbnail.png', import.meta.url)) | |
const encoder = new TextEncoder() | |
const contents = encoder.encode( | |
`export const thumbnail = new Blob(new Uint8Array(${ | |
JSON.stringify(Array.from(bytes)) | |
}), { type: 'image/png' })` | |
) | |
await Deno.writeFile(new URL('./hardcoded-thumbnail.ts', import.meta.url), contents) |
const status = 301 | |
addEventListener('fetch', event => { | |
const url = new URL(event.request.url) | |
url.hostname = url.hostname.replace(/^www\./, '') | |
event.respondWith(Response.redirect(url.toString(), status)) | |
}) |
import { assertEquals } from 'https://deno.land/std@0.125.0/testing/asserts.ts' | |
Deno.test('async iterator throw in next should throw in for scope', async () => { | |
const results: number[] = [] | |
const numbers = (() => { | |
let counter = 0 | |
const iterator: AsyncIterator<number> = { | |
// deno-lint-ignore require-await |