Skip to content

Instantly share code, notes, and snippets.

View abiriadev's full-sized avatar
|| -> Result<_, !> { Abiria()? }

Abiria abiriadev

|| -> Result<_, !> { Abiria()? }
View GitHub Profile
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
🟨 Gold II #15,227 @abiriadev
100일 언제해... 으에에
████████████████████████████████████░░░░░░░░░░░ 1,365
✅ Solved: 321 💠 Class: 4
💡 Contributions: 0 🔥 Rivals: 23
🟨 Gold II #15,157 @abiriadev
100일 언제해... 으에에
███████████████████████████████████▋░░░░░░░░░░░ 1,364
✅ Solved: 318 💠 Class: 4
💡 Contributions: 0 🔥 Rivals: 22
🟥 Ruby III #49 @cgiosy
dafjalkdj!
█████████████████████████████████████████████████████████▍░░░░░░░░░░░
12345678901234567890123456789012345678901234567890123
;kfdjas
dajflskdf
package main
import (
"bytes"
"context"
"fmt"
"log"
"os"
"os/signal"
"strings"
AD Andorra
AE United Arab Emirates
AF Afghanistan
AG Antigua and Barbuda
AI Anguilla
AL Albania
AM Armenia
AN Netherlands Antilles
AO Angola
AQ Antarctica

tail -f가 멀쩡하게 작동하는 원리가 뭘까?

새 파일에 데이터가 추가되었음을 어떻게 알 수 있을까? 데이터가 추가되는 게 아니라 데이터가 완전히 바뀌어 버리면 어떻게 될까?

어떻게 newline-delimited라서 읽어보기 전까진 알 수 없는데 데이터를 읽어내는 것일까?

어떻게 새로 추가된 부분을 알 수 있을까? diff를 사용하나?

바이트 오프셋으로 비교하면 알 수 있는가?

import (
"fmt"
"golang.org/x/sys/unix"
)
func tCol() (int, error) {
var ws unix.Winsize
_, _, err := unix.Syscall(
unix.SYS_IOCTL,
uintptr(0),
@abiriadev
abiriadev / subtype.c
Last active November 26, 2023 03:54
C's subtyping demonstration example
#include <stdio.h>
struct Person {
int age;
};
struct Student {
int age;
int score;
};