Skip to content

Instantly share code, notes, and snippets.

View ziwon's full-sized avatar
๐Ÿ—ฟ
?!

Yeongpil Y. ziwon

๐Ÿ—ฟ
?!
View GitHub Profile
@ziwon
ziwon / gist:cecd97ceaf0197744264582ccff7f80f
Created February 23, 2021 14:31 — forked from sebsto/gist:6441df09e97c4cbbd22b8ba313b8d642
Amazon Linux 2 first boot on Virtual Box
# Download the VDI from https://cdn.amazonlinux.com/os-images/latest/
# Doc is at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html
# Be sure you have config/meta-data and config/user-data ready as per the below
# change ec2-user's password to your password
$ cat config/meta-data
local-hostname: amazonlinux.onprem
# eth0 is the default network interface enabled in the image. You can configure
@ziwon
ziwon / kernel-dev.md
Created September 2, 2020 00:30 — forked from vegard/kernel-dev.md
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

@ziwon
ziwon / keybase.md
Last active February 1, 2020 08:31
Keybase

Keybase proof

I hereby claim:

  • I am ziwon on github.
  • I am ziwon (https://keybase.io/ziwon) on keybase.
  • I have a public key whose fingerprint is EB95 E596 FCC0 7C72 EE62 CCD7 81A8 2D6E 1ABC 9F7A

To claim this, I am signing this object:

@ziwon
ziwon / aws_visualizer.sh
Created December 30, 2019 06:41 — forked from wongcyrus/aws_visualizer.sh
Setup aws-visualizer and cloudmapper in Cloud9
sudo yum install graphviz -y
sudo pip install aws-visualizer
profilename=worldskills
profileregion=us-east-1
rm -rf target/$profilename
mkdir -p target/$profilename/default
mkdir -p target/$profilename/securitygroups
mkdir -p target/$profilename/subnets
@ziwon
ziwon / README.md
Created September 9, 2019 08:08 — forked from leoh0/README.md
google cloud shell์„ ์ด์šฉํ•ด์„œ proxy ์„œ๋ฒ„๋กœ ์‚ฌ์šฉํ•ด์„œ ๊ณต์งœ๋กœ vpn์ฒ˜๋Ÿผ ์ด์šฉํ•˜๊ธฐ

google cloud shell์„ ์ด์šฉํ•ด์„œ proxy ์„œ๋ฒ„๋กœ ์‚ฌ์šฉํ•ด์„œ ๊ณต์งœ๋กœ vpn์ฒ˜๋Ÿผ ์ด์šฉํ•˜๊ธฐ

google cloud shell์€ public ip๊ฐ€ ์—†๋Š” private ip๋งŒ ์žˆ๋Š” container์ž…๋‹ˆ๋‹ค. ์ฆ‰ ์™ธ๋ถ€ ์ ‘๊ทผ์€ google client๋“ค์„ ํ†ตํ•ด์„œ๋งŒ ์ ‘๊ทผ์ด ๊ฐ€๋Šฅํ•œ๋ฐ ์ด๋Ÿฐ ์ž์›๋“ค์„ ๊ฐ€์ง€๊ณ  ์™ธ๋ถ€์— ์ ‘๊ทผ ํ•˜๋Š” proxy๋งŒ๋“œ๋Š” ๋ฒ•์— ๋Œ€ํ•œ ์†Œ๊ฐœ์ž…๋‹ˆ๋‹ค.

MYNOTEBOOK ์ด ๋‚ด๊ฐ€ ์ ‘์†ํ•˜๊ณ  ์žˆ๋Š” chrome์„ ๋„์šธ pc๋ผ๊ณ  ๋ณด์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๋ฌผ๋ก  ๋ณดํ†ต์€ ํฌํŠธํฌ์›Œ๋”ฉ ํ•ด์„œ ์ ‘์† ํ•  ์ˆ˜ ์žˆ๊ฒŒ ์—ด์–ด์•ผ ํ•œ๋‹ค๊ณ  ๋ณด์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

docker run -ti \
#!/bin/bash
create_user_cert(){
USER=$1
CERTS_PATH=/etc/kubernetes/pki/users/${USER}
echo "Creating certificates for user ${USER}"
mkdir -p ${CERTS_PATH}
openssl genrsa -out ${CERTS_PATH}/${USER}.key 2048
openssl req -new -key ${CERTS_PATH}/${USER}.key -subj "/CN=${USER}" -out ${CERTS_PATH}/${USER}.csr
openssl x509 -req -in ${CERTS_PATH}/${USER}.csr -CA /etc/kubernetes/pki/ca.crt -CAkey /etc/kubernetes/pki/ca.key -CAcreateserial -out ${CERTS_PATH}/${USER}.crt
@ziwon
ziwon / nginx-tuning.md
Created April 22, 2019 16:00 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@ziwon
ziwon / cloud-init.sh
Created April 14, 2019 14:48 — forked from ebal/cloud-init.sh
Cloud-init example using a Generic Cloud CentOS-7 on a libvirtd qmu/kvm lab
#!/bin/sh
if [ "$EUID" -ne 0 ]; then
echo -e "\nPlease run as root\neg. sudo $0 \n"
exit
fi
GITHUB_USERNAME="ebal"
cd `mktemp -d`
@ziwon
ziwon / benchmark-commands.txt
Created January 9, 2019 04:20 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@ziwon
ziwon / .gitconfig
Created October 25, 2018 06:17 — forked from Wirone/.gitconfig
GIT & GitFlow aliases for ~/.gitconfig
# GIT aliases for ~/.gitconfig file
# @author Grzegorz Korba <[email protected]>
# Credits: Miscellaneous places on the Internet...
# GitFlow related sections
[gitflow "branch"]
master = master
develop = develop
[gitflow "prefix"]
feature = feature/