Skip to content

Instantly share code, notes, and snippets.

View ziwon's full-sized avatar
🗿
?!

Yeongpil Y. ziwon

🗿
?!
View GitHub Profile
@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 / 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 / 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 / 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 \
@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 / 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 / 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 / instance-types.sh
Created May 13, 2021 10:13 — forked from trestletech/instance-types.sh
Get all EC2 Instance Types in All Availability Zones
#!/bin/bash
region="ap-northeast-2"
all_az=()
az_per_region=$(aws ec2 describe-availability-zones --region $region --query 'AvailabilityZones[*].[ZoneName]' --output text | sort)
while read -r az; do
all_az+=($az)
done <<< "$az_per_region"
@ziwon
ziwon / dr-ec2-instances-per-az.sh
Created June 3, 2021 01:54 — forked from andromedarabbit/dr-ec2-instances-per-az.sh
Get a report on How EC2 instances are deployed across multiple AZs
#!/bin/bash
type csvsql || brew instal csvkit
type jq || brew install jq
type aws || brew intall awscli
TABLE_NAME=tmp
TMP_FILE=${TABLE_NAME}.csv
OUTPUT_FILE="output.csv"
truncate -s 0 "${OUTPUT_FILE}"
@ziwon
ziwon / copy_one_line_per_sec.bash
Created July 24, 2021 07:28 — forked from dlamblin/copy_one_line_per_sec.bash
Subscribing to an AWS region's status RSS feeds in slack
sleep 5; while read -r line; do clear; echo $line; echo "$line" | pbcopy; sleep 1; done < "feed_commands_for_seoul_ap-northeast-2.txt"