Skip to content

Instantly share code, notes, and snippets.

View magurotuna's full-sized avatar
🍣
eating sushi

Yusuke Tanaka magurotuna

🍣
eating sushi
View GitHub Profile
Warning `"nodeModulesDir": false` is deprecated in Deno 2.0. Use `"nodeModulesDir": "none"` instead
at file:///Users/yusuke/Repo/github.com/Milly/ts-streams/deno.jsonc
Task test:doc deno task test --doc
Warning `"nodeModulesDir": false` is deprecated in Deno 2.0. Use `"nodeModulesDir": "none"` instead
at file:///Users/yusuke/Repo/github.com/Milly/ts-streams/deno.jsonc
Task test deno test "--doc"
Warning `"nodeModulesDir": false` is deprecated in Deno 2.0. Use `"nodeModulesDir": "none"` instead
at file:///Users/yusuke/Repo/github.com/Milly/ts-streams/deno.jsonc
running 1 test from ./internal/deferred_test.ts
_deferred() ...
❯ ./target/debug/deno test --doc cli/tsc/dts/lib.deno.ns.d.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$22-28.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$64-69.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$75-79.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$153-165.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$321-324.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$332-335.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$365-368.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$383-386.ts
Check file:///Users/yusuke/Repo/github.com/magurotuna/deno/cli/tsc/dts/lib.deno.ns$d$ts$422-425.ts
@magurotuna
magurotuna / init.lua
Last active December 20, 2022 14:14
init.lua
vim.g.mapleader = ' '
vim.api.nvim_command('filetype plugin indent on')
vim.opt.encoding = 'utf-8'
vim.opt.number = true
vim.opt.ruler = true
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.signcolumn = 'yes'
vim.opt.tabstop = 2
const std = @import("std");
const testing = std.testing;
const mem = std.mem;
const math = std.math;
const time = std.time;
const AutoHashMap = std.AutoHashMap;
const AutoArrayHashMap = std.AutoArrayHashMap;
const BufMap = std.BufMap;
const BufSet = std.BufSet;
const ArrayList = std.ArrayList;

zig-tls-client-hello

TLS 1.3 Client Hello in Zig

version

  • Zig: 0.10.0-dev.3007+6ba2fb3db
  • OpenSSL: 3.05

プロジェクト構造

@magurotuna
magurotuna / foo.json
Last active January 23, 2022 04:23
check if syntax highlight for json with comments works
{
// comment
"foo": 42, // trailing comma
}
@magurotuna
magurotuna / init.vim
Last active September 3, 2022 06:23
init.vim
let mapleader = "\<Space>"
filetype plugin indent on
set encoding=utf-8
set number
set ruler
set autoindent
set smartindent
set signcolumn=yes
set tabstop=2
import {
Application,
Router,
Status,
} from "https://deno.land/x/[email protected]/mod.ts";
function createApp(): Application {
const app = new Application();
const router = new Router();
// https://github.com/denoland/deno_doc/pull/105
export function f1(val1: A | B): val1 is A {}
export function f2(val2: any): asserts val2 is string {}
export function f3(val3: any): asserts val3 {}
export function assertIsDefined<T>(val4: T): asserts val4 is NonNullable<T> {
if (val === undefined || val === null) {
throw new AssertionError(
`Expected 'val' to be defined, but received ${val}`
);
}
@magurotuna
magurotuna / dns_test.rs
Last active January 18, 2021 17:04
dns test works
use std::collections::BTreeMap;
use std::net::Ipv4Addr;
use std::net::SocketAddr;
use std::str::FromStr;
use std::sync::Arc;
use std::sync::RwLock;
use std::time::Duration;
use tokio::net::TcpListener;
use tokio::net::UdpSocket;
use trust_dns_client::rr::LowerName;