View gist:eb6f0f076767872e276ec62d9a26e238
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=sksmsqnwk11 -d -v ~/temp/docker_data/pgdata:/var/lib/postgresql/data -v ~/temp/docker_data/backup:/home/postgres -d postgres:14.7 | |
docker update e5xxx --restart unless-stopped |
View sudo root pyenv use python3 howto sudoer sudo visudo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add any necessary path (e.g., /app/pyenv/shims) to secure_path, and it will be passed to sudo commands. | |
Defaults secure_path = /app/pyenv/libexec:/app/pyenv/shims:/sbin:/bin:/usr/sbin:/usr/bin | |
more: define-path-environment-variable-sudo-commands | |
from: https://github.com/pyenv/pyenv/issues/79 |
View gist:e125db627033950b4e6d2565b7a78511
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in **/*flac;do ffmpeg -i "${i}" -c:a alac -vn "${i}";done |
View gist:2c5cf4e49a08de32b4cb5d177e05aab8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disk usage : df -h (-hs) | |
directory usage : du -h | |
du -h * ( 1 subdirectories ) |
View gist:afb173a5ea39eb5264ebf75c5fb95105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
#Sat, 18 Jul 2020 16:05:42 GMT | |
#fmt = '%a, %d %b %Y %H:%M:%S GMT' | |
fmt = '%d %b %Y %H:%M:%S' | |
dump_ts_str = datetime.datetime.strptime(server_time, fmt) | |
#dump_ts_str = time.strptime(server_time, fmt) | |
KST = datetime.timezone(datetime.timedelta(hours=9)) |
View git fork update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add upstream https://.../ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git | |
git fetch upstream | |
git merge upstream/master |
View git submodule update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git submodule update --remote --merge |
View ffmpeg subfolder recursively encode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in ./**/*flac;do ffmpeg -i "${i}" -vn -c:a alac "${i}.m4a";done |
View gist:d5a956c15d18b74911712b467f0f82c0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i "$i.mkv" -map 0:m:language:kor "$i.kor.srt" |