Skip to content

Instantly share code, notes, and snippets.

@pegasuskim
pegasuskim / toss-technical-doc-guide.md
Created May 20, 2025 04:20 — forked from ghostflare76/toss-technical-doc-guide.md
토스 테크니컬 가이드 문서 기반으로 만든 rule

기본 문서 작성하기

이 문서에서는 가장 기본적인 문서인 튜토리얼과 트러블슈팅 문서를 작성하는 방법을 알려드려요. 문서를 작성할 때 주의해야 할 점과 개선할 수 있는 부분을 함께 살펴봐요.

학습을 위한 문서

이 문서에서는 React를 처음 접하는 초보 개발자를 대상으로 'React 컴포넌트 만들기'라는 튜토리얼을 개선해 볼 거예요. 개선 전과 개선 후를 비교하면서 어떤 부분이 개선됐는지 살펴보세요.

참고하세요
학습을 위한 문서는 독자가 새로운 기술이나 도구를 배울 수 있도록 돕는 문서예요. 이 문서에서는 구체적인 예시, 실행 가능한 코드, 성공적인 경험을 제공해야 해요.

@pegasuskim
pegasuskim / mrz.d
Created August 6, 2024 05:04 — forked from btbytes/mrz.d
MRZ (Machine Readable Zone) checksum calculator
import std.algorithm;
import std.range;
ubyte charCode(dchar c) pure {
switch (c) {
case '<': return 0;
case 'A': .. case 'Z': return cast(ubyte)(c - 'A' + 10);
case '0': .. case '9': return cast(ubyte)(c - '0');
default: assert(0);
}
@pegasuskim
pegasuskim / postgres-cluster.yaml
Created October 20, 2021 11:33 — forked from kofemann/postgres-cluster.yaml
Running postgres in kubernetes
#
# postgres cluster in kubernetes with max 8 replicas
#
# the master is always on ${host}-0
#
#
# postgres master/slave configuration
#
@pegasuskim
pegasuskim / ecs-cluster-userdata.sh
Created September 16, 2020 04:12 — forked from wolfeidau/ecs-cluster-userdata.sh
cloudwatchlogs setup userdata script
#!/bin/bash -e
yum update -y
yum install -y aws-cfn-bootstrap git aws-cli
# Install the files and packages from the metadata
/opt/aws/bin/cfn-init -v --stack "{{ aws_stack_name }}" \
--resource ECSInstanceLaunchConfiguration \
--configsets ConfigCluster \
--region "{{ ref('AWS::Region') }}"
@pegasuskim
pegasuskim / CloudWatch-EC2-logs.md
Created September 16, 2020 04:09 — forked from danteay/CloudWatch-EC2-logs.md
Add logs from EC2 instance to CloudWatch logs

CloudWatch-EC2

Agent Config

1.- Create new Log Group in CloudWatch

2.- Download agent in EC2 instance

sudo wget http://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py
@pegasuskim
pegasuskim / linux-explorer.sh
Created August 13, 2020 07:19 — forked from chrisfu/linux-explorer.sh
Linux Explorer system information script
#!/bin/bash
##############################################################################
#
#
# FILE : linux-explorer.sh
# Last Change Date : 04-07-2016
# Author(s) : Joe Santoro
# Date Started : 15th April, 2004
# Email : linuxexplo [ at ] unix-consultants.com
# Web : http://www.unix-consultants.com/examples/scripts/linux/linux-explorer
@pegasuskim
pegasuskim / gcp_vision_api_test_code.py
Created January 8, 2020 23:40 — forked from jybaek/gcp_vision_api_test_code.py
google cloud platform (vision api)
import io
import os
# export GOOGLE_APPLICATION_CREDENTIALS=/home/oops/github/gcloud/GCP-ML-8492a87b7f32.json
# Imports the Google Cloud client library
from google.cloud import vision
# Instantiates a client
vision_client = vision.Client()
@pegasuskim
pegasuskim / docker_cheat.md
Created September 17, 2019 14:41 — forked from nacyot/docker_cheat.md
도커(Docker) 치트 시트
@pegasuskim
pegasuskim / PythonTest
Last active August 26, 2019 14:45
CodingTest01
d1 = {'만':10000, '억':100000000, '조':1000000000000, '경':10000000000000000}
d2 = {'십':10, '백':100, '천':1000}
d3 = {'일':1, '이':2, '삼':3, '사':4, '오':5, '육':6, '칠':7, '팔':8, '구':9}
# 'xxxx경', 'xxxx조', 'xxxx억', 'xxxx만', 'xxxx' 순서대로 리턴
def cut1(krw):
for u in '경조억만':
if u in krw:
if krw[0] == u:
raise Exception
@pegasuskim
pegasuskim / installHAProxy.sh
Created September 8, 2018 04:05 — forked from emgee3/installHAProxy.sh
Install HAProxy in Ubuntu 14.04 or 12.04
#!/usr/bin/env bash
#
# Install HAProxy
# Script works on Ubuntu 12.04 and 14.04 only
set -e
set -u
set -o pipefail