Skip to content

Instantly share code, notes, and snippets.

@toriato
toriato / closecaption_tool.py
Last active November 16, 2024 18:08
Extract or translate VDF key-valve file (for closed caption and etc)
# (required) pip install vdf
# (optional) pip install openai
#
# Usage:
# python closecaption_tool.py "closecaption_english.txt" "closecaption_korean.txt"
from typing import Dict
from dataclasses import dataclass
from argparse import ArgumentParser
from pathlib import Path
@toriato
toriato / !README.md
Created October 21, 2024 05:20
SMB 프로토콜에서 발생하는 캐시되지 않은 파일의 읽기 속도 저하 문제

image

계기

윈도우 데스크탑에서 서버로 사용 중인 미니PC에 물린 DAS 내 파일 가져올 때 속도가 더럽게 느림

과정

  • 다음 명령어로 파편화 여부를 확인
@toriato
toriato / !README.md
Last active October 20, 2024 03:39
Podman quadlet example

Podman quadlet example

#!/usr/bin/python
from typing import List
from dataclasses import dataclass
from argparse import ArgumentParser
from pathlib import Path
from urllib.parse import urlparse, ParseResult
from requests import session
from subprocess import call
@dataclass
@toriato
toriato / quadlet-exec.sh
Last active October 20, 2024 03:41
podman exec macro for quadlet containers
#!/bin/sh
# simple podman exec macro for quadlet containers
# locate this script into ~/.profile
# $ crontab -l
# */5 * * * * . ~/.profile && XDG_RUNTIME_DIR="/run/user/$(id -u)" nextcloud_cron
# 0 * * * * . ~/.profile && XDG_RUNTIME_DIR="/run/user/$(id -u)" nextcloud_occ files:scan --path=user/files
quadlet () {
local container=$1
if [ -z "$container" ]; then
@toriato
toriato / !README.md
Last active October 18, 2024 19:37
Script to update personal block words on DC Inside
@toriato
toriato / hack-the-android-version-of-dcinside.md
Last active October 11, 2024 23:09
Hack the Android version of DC Inside (com.dcinside.app.android)

image

This is a simple tutorial on how to get rid of annoying protections!

  1. Remove ads, integrity checks, and signature verification with LuckyPatcher
  2. Install the latest Android SDK:
    • scoop install android-studio
    • Open Android Studio to download the latest SDK.
    • $env:Path = "${env:LocalAppdata}\Android\Sdk\build-tools\xx.x.x;" + $env:Path
  3. Pull split APKs from the device:
@toriato
toriato / !README.md
Last active September 22, 2024 04:39
AHK script for KartRider Minecraft movement mapping
#!/bin/zsh
PATH="/usr/lib/jvm/java-21-openjdk/bin/:$PATH" \
java \
-Xms24G -Xmx24G \
\
--add-modules=jdk.incubator.vector \
\
-XX:+UnlockExperimentalVMOptions \
-XX:+UseLargePages -XX:+UseTransparentHugePages \
@toriato
toriato / process.py
Last active April 7, 2024 18:24
Mass converter for Telegram video sticker
import logging
from pathlib import Path
from subprocess import run
input_dir = Path("input/")
output_dir = Path("output/")
max_duration = 2.95
max_size = 1024 * 256