Skip to content

Instantly share code, notes, and snippets.

View yspkm's full-sized avatar

Yosep Kim yspkm

  • Seoul National University
  • Republic of Korea
View GitHub Profile
@yspkm
yspkm / debug.h
Created March 29, 2023 12:28
디버깅용 커스텀 매크로
#include <stdio.h>
#include <stdlib.h>
#define assert(expr) do { \
if (!(expr)) { \
fprintf(stderr, "Assertion failed: %s:%d: %s\n", __FILE__, __LINE__, #expr); \
exit(EXIT_FAILURE); \
} \
} while(0)
@yspkm
yspkm / cassandra-remote.md
Last active September 4, 2023 14:39
카산드라 db 원격 연결 방법

Make these changes in the cassandra.yaml config file:

start_rpc: true

rpc_address: 0.0.0.0

broadcast_rpc_address: 1.2.3.4

listen_address: [node-ip]

@yspkm
yspkm / seq_nprint_files.sh
Last active May 1, 2023 06:40
N개의 넘버링된 파일에 대한 명령 실행 및 stdout에 출력하는 seq문
seq <개수> | xargs -I % 명령어 <file명_넘버링은 %>.<식별자>
@yspkm
yspkm / Dockerfile
Created May 29, 2023 15:28
rocky linux image for test
FROM rockylinux:9.2
WORKDIR /app
RUN dnf update -y && dnf install -y \
python3 \
python3-devel \
gcc \
openssl-devel \
libffi-devel \
@yspkm
yspkm / init
Created June 7, 2023 01:38
initial setting
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential -y
sudo apt-get install openjdk-20-jdk -y
sudo apt-get install python3 python3-pip python-is-python3 -y
sudo apt-get install golang-go -y
sudo apt-get install net-tools
sudo apt-get install ucommon-utils
gcloud container clusters create k8s \
--cluster-version 1.27.2-gke.1200 \
--zone asia-northeast3-a \
--num-nodes 3 \
--machine-type n1-standard-4 \
--enable-network-policy \
--enable-vertical-pod-autoscaling
python3 -m venv env-id
source env-id/bin/activate #요 부분이 21년 자료랑 약가 다름?
@yspkm
yspkm / init.md
Last active July 25, 2023 00:26
vscode 맥에서 설정
  1. code 명령어 생성

command + shift + p 누르고 shell 입력한 뒤에 code 명령어 생성

  1. 플러그인과 실행시 방향키 꾹 누르면 연속입력

defaults write -g ApplePressAndHoldEnabled -bool false

@yspkm
yspkm / init.sh
Last active August 4, 2023 09:49
cassandra-spark
pyspark --packages com.datastax.spark:spark-cassandra-connector_2.12:3.4.0 --conf spark.cassandra.connection.host=ip주소
spark-submit --packages com.datastax.spark:spark-cassandra-connector_2.12:3.4.0 /abs/path/test.py
@yspkm
yspkm / url
Created August 5, 2023 02:12
Spark to Kafka
https://velog.io/@statco19/pyspark-kafka-streaming