Skip to content

Instantly share code, notes, and snippets.

View YangKeao's full-sized avatar
🎯
Focusing

YangKeao YangKeao

🎯
Focusing
View GitHub Profile
@YangKeao
YangKeao / main.go
Created February 5, 2025 13:28
A demo shows that Linux will attach `FIN` flag to the last packet in the queue, which will cause `PSH, FIN` in the same packet.
package main
import (
"bufio"
"fmt"
"log"
"net"
"os"
"strings"
"time"
@YangKeao
YangKeao / test.sql
Created March 9, 2026 06:13
Mnemis with TiDB
-- This query answers 'Which cities did Dave travel to in 2023?'
CREATE TABLE episodes (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
content TEXT NOT NULL,
valid_at DATETIME NOT NULL,
session_id BIGINT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
INDEX idx_episodes_valid (valid_at)
);