Skip to content

Instantly share code, notes, and snippets.

View TyeolRik's full-sized avatar

TyeolRik TyeolRik

View GitHub Profile
#!/bin/bash
NC='\033[0m' # No Color
YELLOW='\033[1;33m'
cephfs_ip="10.0.2.15" # ceph mon dump
clusterID="e952c52a-f18f-11ec-bb41-08002716126b" # ceph mon dump
cephfs_user_key="AQAfDrJibQtyARAAp3DxKWUP2LBCPbJUe9BUDg==" # ceph auth get-or-create client.cephfs mon 'allow r' osd 'allow rwx pool=kubernetes'
cephfs_admin_key="AQDzDbJiuBawARAA2NBP5/wgoaadOYGWIrUFFA==" # ceph auth get client.admin
sudo dnf update -y &&\
#!/bin/bash
NC='\033[0m' # No Color
YELLOW='\033[1;33m'
sudo dnf update -y &&\
sudo dnf install -y kernel-devel kernel-header* make gcc elfutils-libelf-devel
printf "${YELLOW}Installing Docker${NC}\n"
sudo yum install -y yum-utils telnet &&\
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &&\
#!/bin/bash
dnf update -y &&\
dnf install -y kernel-devel kernel-header* make gcc elfutils-libelf-devel
echo "Installing Docker"
yum install -y yum-utils telnet &&\
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &&\
yum install -y --allowerasing docker-ce docker-ce-cli containerd.io docker-compose-plugin &&\
systemctl enable docker.service &&\
dnf update -y &&\
dnf install -y kernel-devel kernel-header* make gcc elfutils-libelf-devel
echo "Installing Docker"
yum install -y yum-utils telnet &&\
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &&\
yum install -y --allowerasing docker-ce docker-ce-cli containerd.io docker-compose-plugin &&\
systemctl enable docker.service &&\
systemctl start docker.service
echo "Docker install complete"
@TyeolRik
TyeolRik / k8s_worker.sh
Last active June 15, 2022 08:23
template
#!/bin/bash
dnf update -y &&\
dnf install -y kernel-devel kernel-header* make gcc elfutils-libelf-devel
echo "Installing Docker"
yum install -y yum-utils telnet &&\
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &&\
yum install -y --allowerasing docker-ce docker-ce-cli containerd.io docker-compose-plugin &&\
systemctl start docker
@TyeolRik
TyeolRik / k8s_master.sh
Last active June 15, 2022 08:21
CentOS8 install preset
#!/bin/bash
dnf update -y &&\
dnf install -y kernel-devel kernel-header* make gcc elfutils-libelf-devel
echo "Installing Docker"
yum install -y yum-utils telnet &&\
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo &&\
yum install -y --allowerasing docker-ce docker-ce-cli containerd.io docker-compose-plugin &&\
systemctl start docker
@TyeolRik
TyeolRik / SHA_256_with_OpenSSL.cpp
Created January 4, 2021 14:47
OpenSSL SHA256 Simple Usage Example
// In Ubuntu 20.04 LTS
// g++ -g [cpp file name] -o [output file name] -O2 -lcrypto
#include <iostream>
#include <iomanip>
#include <sstream>
#include <openssl/sha.h>
std::string sha256(const std::string str)
{
@TyeolRik
TyeolRik / dockerfile
Created October 27, 2020 09:00
Change Mirror server for Korean in Docker Ubuntu
# example Dockerfile
FROM ubuntu:20.04
RUN cd /etc/apt && \
sed -i 's/archive.ubuntu.com/ftp.kaist.ac.kr/g' sources.list
RUN apt-get update && apt upgrade
@TyeolRik
TyeolRik / get_problem_number.py
Created September 6, 2020 22:44
Automatic BaekJoon Problem Directory Builder
#-*- coding:utf-8 -*-
# Python 3.8
# need Libraries: beautifulsoup4, requests
"""
This python file is for getting problem number and making .cpp files automatically in one page
This Programs Returns
─ FolderName
├─ 1234.cpp
├─ 2345.cpp
@TyeolRik
TyeolRik / tasks.json
Last active August 19, 2022 03:44
Compile and Run AT ONCE in Linux(Debian) VS Code. Just Press 'Ctrl + Shift + B'
// This tasks.json is for C++.
// In *.cpp, Just Press "Ctrl + Shift + B" for Compile, Run, Delete Compiled Binary File AT ONCE.
{
"version": "2.0.0",
"type": "shell",
"tasks": [
{
"label": "save and compile for C++",
"command": "g++",
"args": [