SSHFS と iptables で遅いファイルシステムを手に入れようのコーナー
素早いプログラムほど I/O しない。
最近はやたらと SSD やネットワークが速くなった。
だから逆に、 I/O によるボトルネックを見つけにくい。
require 'rom-repository' | |
require 'rom-sql' | |
require 'logger' | |
config = ROM::Configuration.new(:sql, 'sqlite::memory') | |
config.gateways[:default].connection.create_table(:songs) do | |
primary_key :id | |
column :title, String | |
end |
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
# syntax = docker/dockerfile:1.4.0 | |
FROM node:20 | |
WORKDIR /root | |
RUN npm install sqlite3 |
Terminal emulators typically receive window resize events by installing a signal handler for the SIGWINCH signal. Handling of these signals can create challenges due to their inherently racy properties. Resize events must be synchronized with other application state in a safe manner.
Standard control sequences exist to query the current terminal size from the
terminal and receive an in-band control sequence with the window size. However,
this system requires polling - which is not ideal. Usually, SIGWINCH
handling