Skip to content

Instantly share code, notes, and snippets.

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

Abiria abiriadev

|| -> Result<_, !> { Abiria()? }
View GitHub Profile
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를 사용하나?

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

How to Dump & Restore MySQL Databases Using Docker

Disclaimer

This guide assumes specific scenarios, such as when you need to dump an existing production environment database and run it locally for inspection or testing.

So we don't make any changes to the official MySQL image, build our own image, or publish a hefty image to our own private production-ready Docker registry running on EC2 instance, etc.

In this way, you can easily switch between multiple dump files with minimal effort; just copy the SQL files, and restart the container.

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;
};

Telescope

(Tim Legend)

Verse 1

I was looking at the sky, it opened up
밤하늘을 바라보고 있을 때, 하늘이 열리고

Saw you coming down, like Gabriel
마치 가브리엘처럼, 네가 내려오는 걸 봤어

Only Me

(Monday)

Intro

I wanna hear you say
네가 말해줬으면 해

That you only want me
너에겐 나뿐이라고

Flourish

(Alohaii)

Verse 1

Hey, let's paint the sky
하늘을 칠해보자

The colors rise and fall, we'll try them all our lives
뜨고 저무는 색깔들, 평생 시도해볼 거야