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
@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/oak@v7.5.0/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;
@magurotuna
magurotuna / .commit_template
Last active November 25, 2019 16:08
Git Commit Template with Emoji
# ==================== Emojis ====================
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# 🔖 :bookmark: バージョンタグ(Version Tag)
# ✨ :sparkles: 部分的な機能追加
# 👍 :+1: 機能改善
# 🐛 :bug: バグ修正(Bugfix)
# ♻️ :recycle: リファクタリング(Refactoring)
# 🚿 :shower: 不要な機能・使われなくなった機能の削除