Skip to content

Instantly share code, notes, and snippets.

View sftblw's full-sized avatar

Ch. (Chanwhi Choi) sftblw

View GitHub Profile
@sftblw
sftblw / compare_tree.sh
Created July 22, 2024 02:54
compare_tree.sh (ChatGPT)
#!/bin/bash
# 비교할 폴더 경로를 인자로 받음
FOLDER1=/path_1
FOLDER2=/path_2
# 임시 파일 생성
TEMP1=$(mktemp)
TEMP2=$(mktemp)
@sftblw
sftblw / CoroutineDebugConfig.kt
Last active July 22, 2024 02:36
CoroutineDebugConfig (ChatGPT's suggesstion)
import jakarta.annotation.PostConstruct
import jakarta.annotation.PreDestroy
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.debug.DebugProbes
import org.springframework.context.annotation.Configuration
// https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-debug/
@Configuration
class CoroutineDebugConfig {
@OptIn(ExperimentalCoroutinesApi::class)
@sftblw
sftblw / clean_cargo_targets.js
Created January 22, 2024 01:56
clean_cargo_targets.js
// chatgpt-generated with human aid
// removes "target" dir which has "Cargo.toml" in root
const fs = require('fs/promises');
const fss = require('fs');
const path = require('path');
async function removeTargetDirs(dir) {
let stack = [dir];
let deletePromises = [];
@sftblw
sftblw / Readme.md
Created January 22, 2024 01:14
firefish.yaml

Firefish with plain k8s objects and fluxcd.

If you are not using fluxcd, you can simply use plain helm command.

@sftblw
sftblw / Readme.md
Last active November 15, 2023 13:09
poor man's cloud-init.sh for OCI OKE
  • remove /var/oled
  • create swap kubelet does not support swap; It leads unrecoverable node.
  • k8s swap: alpha support on 1.22 and beta on 1.28
@sftblw
sftblw / longhorn-storagclass_any.yml
Created August 16, 2023 03:49
longhorn storage class (ext4 best effort locality)
# https://longhorn.io/docs/1.4.2/volumes-and-nodes/create-volumes/
# https://longhorn.io/docs/1.5.0/volumes-and-nodes/storage-tags/#overview
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: longhorn-delete-triple
provisioner: driver.longhorn.io
allowVolumeExpansion: true
@sftblw
sftblw / mastodon-bigemoji-widemoji.css
Last active July 24, 2023 06:53
mastodon-bigemoji-widemoji.css
.status__content .emojione,
.detailed-status .status__content
.emojione {
width: auto; min-width: 1em; max-width: 90%; height: 1em; font-size: 3em;
transition: transform .05s ease;
}
.status__content .emojione:hover,
.detailed-status .status__content .emojione:hover {
transform: scale(2);
@sftblw
sftblw / .wezterm.lua
Created June 9, 2023 02:50
.wezterm.lua
-- https://wezfurlong.org/wezterm/config/files.html
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
@sftblw
sftblw / chatgpt_pekora_ko.md
Created February 18, 2023 09:30
chatgpt_pekora_ko.md

input

노우사기쨩 곤니찌와! 노우사기쨩이 앞으로 해야할 일은 3개의 테이블을 만들어주는 일이야.

1. 원본 텍스트가 들어있는 테이블 (제목은 쓰지 말고 테이블만). 항목: 원본 텍스트, Pekora 말투 점수 (10점 만점, 숫자로 표현), 페코페코 리뷰
2. ChatGPT가 원본 텍스트를 Usada Pekora 말투로 바꾼 텍스트가 들어있는 테이블  (제목은 쓰지 말고 테이블만). 항목: 좀 더 페코라스럽게 (ChatGPT가 Pekora 말투로 바꾼 내용), Pekora 말투 점수 (10점 만점, 숫자로 표현), 페코페코 리뷰
3. 원본 텍스트의 상세 평가 테이블 (제목은 쓰지 말고 테이블만). 항목: 평가 항목, 별점, 리뷰

상세 평가 테이블을 만들 때에는 다음의 규칙이 있어.
@sftblw
sftblw / chatgpt_nyan_generator.md
Last active July 28, 2023 02:45
chatgpt_nyan_generator.md