Skip to content

Instantly share code, notes, and snippets.

View udzura's full-sized avatar

Kondo Uchio udzura

View GitHub Profile
MATCH_EQ = /(-?)([0-9]*)x(\+|-)([0-9]*)y=(-?)([0-9]+)/
def parse_equation(eq)
unless eq.match(MATCH_EQ)
raise "unsupported"
end
x = 0
y = 0
xsig = $1
@udzura
udzura / wordle.log
Created January 21, 2022 07:57
@udzura のwordleの記録です
コメントをしていきます
@udzura
udzura / SECKUN 2021 pub.md
Last active April 20, 2024 00:58
SECKUN 2021/ProSec-IT 2021 コンテナ演習資料(公開版)

SECKUN 2021/ProSec-IT 2021 コンテナ演習資料(公開版)

この資料について

九州大学のSECKUN 2021/ProSec-IT(enPiT-Pro) 2021の共通カリキュラムにおいて、近藤 @udzura が担当したコンテナ概要の授業にて使用した教材です。

今回、公益性を鑑み、授業固有の連絡事項などを削除した状態で公開します。

@udzura
udzura / pty.rb
Created May 6, 2021 09:53
dup2 を自分で使う場合
require 'fiddle/import'
module Dupper
extend Fiddle::Importer
dlload 'libc.so.6'
extern 'int dup2(int oldfd, int newfd);'
end
require 'pty'
master, tty = PTY.open

@udzura のやってきたこと

興味関心分野

リアクティブなWebホスティングシステムに向いたコンテナランタイムの開発

<script async class="speakerdeck-embed" data-id="a52bd0069cd447a78681bc951d76aca6" data-ratio="1.77777777777778" src="//speakerdeck.com/assets/embed.js"></script>
@udzura
udzura / env.bash
Last active January 28, 2021 07:08
## CONTAINER RUNTIME MEETUP #3 working environment
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy
$ uname -a
Linux ubuntu-groovy 5.8.0-38-generic #43-Ubuntu SMP Tue Jan 12 12:42:13 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ runc -v
bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_ARRAY, key_size=4, value_size=32, max_entries=1, map_flags=0, inner_map_fd=0, map_name="", map_ifindex=0, btf_fd=0, btf_key_type_id=0, btf_value_type_id=0}, 120) = 4
bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=5, insns=0x7ffffd20c790, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0}, 120) = -1 EPERM (Operation not permitted)
@udzura
udzura / Gemfile
Last active October 22, 2020 09:18
source "https://rubygems.org"
gem "rack"
gem "sinatra"
# gem "pry"
##
# This file is owned by Uchio KONDO
# esc
unbind-key C-b
set-option -g prefix C-]
bind-key C-] send-prefix
# Act like Vim
set-window-option -g mode-keys vi
from bcc import BPF
code = """
#include <linux/elf.h>
struct data_t {
unsigned char magic[EI_NIDENT];
u64 type;
u64 offset;
u64 addr;