Skip to content

Instantly share code, notes, and snippets.

import os
import shutil
import eyed3
# Specify the root directory
root_dir = 'src_path'
output_dir = 'target_path'
# Recursively walk through all directories
for dir_path, dir_names, file_names in os.walk(root_dir):
import unicodedata
import sys
def main():
for line in sys.stdin:
tostr = unicodedata.normalize('NFC', line)
print(tostr, end='')
if __name__ == "__main__":
@import url(https://spoqa.github.io/spoqa-han-sans/css/SpoqaHanSansNeo.css);
html body {
font-family: "Spoqa Han Sans Neo", "Noto CJK";
}
#!/bin/bash
# BASEDIR=$(dirname $0)
# ./yt-dlp -v -f bestvideo+bestaudio $1
#$BASEDIR/yt-dlp -v -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' $1
# yt-dlp -v -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]' $1
yt-dlp -x --yes-playlist --audio-format mp3 -o '%(playlist_index)02d %(title)s.%(ext)s' $1
version: '3.7'
services:
sqlserver:
image: mcr.microsoft.com/azure-sql-edge:latest
user: root
container_name: sql1
hostname: sql1
ports:
- 1433:1433
volumes:
@cdecl
cdecl / .gitconfig
Last active October 18, 2022 22:55
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
name = Byung Kyu KIM
email = cdeclare@gmail.com
[core]
quotepath = false
[filter "lfs"]
@cdecl
cdecl / Epoch.py
Created September 26, 2022 13:11
import time
from datetime import datetime
tm = time.localtime(1648771200000 / 1000)
s = time.strftime('%Y-%m-%d %H:%M:%S', tm)
print(s)
r = time.strptime("2022-05-01 09:00:00", '%Y-%m-%d %H:%M:%S')
print(r)
input {
beats {
port => 5044
}
http {
host => "0.0.0.0"
port => 8044
}
}
@cdecl
cdecl / create-select.sql
Last active August 23, 2022 23:50
presto-table
create table hive.default.sample (
id varchar,
name varchar,
etc1 array(row(key1 varchar, key2 varchar)),
etc2 array(varchar)
)
with (
format = 'json',
external_location = 's3a://data/sample/'
@cdecl
cdecl / docker-compose.yaml
Created July 25, 2022 07:26
rundeck docket-compose
version: '3'
services:
rundeck:
image: rundeck/rundeck:4.4.0
container_name: rundeck
restart: always
links:
- mysql