Skip to content

Instantly share code, notes, and snippets.


Luca Casonato lucacasonato

View GitHub Profile
lucacasonato /
Last active May 22, 2021
Luca Casonato (E1) <>


Key ID: 808AD7C0F245EA46

Subkeys: 412A10CA3031388A, 141C8B418031A4E6, 01A83EB62563811F

Setup GPG

git config --global user.signingkey 808AD7C0F245EA46
lucacasonato / .dprintrc.json
Created Mar 21, 2021
dprint config for deno with tabs
View .dprintrc.json
"$schema": "",
"projectType": "openSource",
"incremental": true,
"typescript": {
"deno": true,
"useTabs": true
"includes": ["**/*.{ts,tsx,js,jsx}"],
"excludes": ["**/node_modules"],
lucacasonato /
Last active Apr 3, 2021
FetchEvent polyfill in Deno, with demo

This example demonstrates how to polyfill the "fetch" event in Deno, and gives an example for how this can be used to run Cloudflare Workers in Deno.

To try it locally run the script below, and visit

$ deno run --allow-net
View a.ts
setInterval(() => console.log(import.meta.url), 1000);
lucacasonato /
Last active Oct 4, 2021
All modules without released versions - will update daily

These are all modules on that do not have released versions. These will break soon, so please create a tag / release.

If you want your module to be removed from the list because your module is not maintained anymore, you can let me know until August 1st 2020. After that time removing modules and versions will not be possible anymore.

We will keep your module around until August 14th. If you do not release a version by then, your module name will be unreserved from you, and anyone will be able to register this name.

lucacasonato / Cargo.lock
Created Jul 18, 2020
reqwest max http2 connections bug
View Cargo.lock
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
name = "adler"
version = "0.2.3"
source = "registry+"
checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
name = "alloc-no-stdlib"
lucacasonato /
Created Jul 18, 2020
Run oak in a worker

deno run -A --unstable ./main.ts

lucacasonato / deno.ts
Last active Jun 2, 2020
Read text from body
View deno.ts
import { serve } from "";
const s = serve({ port: 8000 });
const decoder = new TextDecoder();
for await (const req of s) {
const body = await Deno.readAll(req.body);
const str = decoder.decode(body);
console.log(`Body: ${str}`);
req.respond({ body: str });
View decorator.ts
function decorate(target: any) {}
class Foo {}