Skip to content

Instantly share code, notes, and snippets.

@Koasing
Koasing / rsync.md
Last active May 30, 2018 05:23
Rsync for NAS beginner

Rsync for NAS beginner

Local backup

rsync -ahvP [-c] [-m] [-W] [-n] [--remove-source-files] [--log-file=FILE] src dest

use sudo to keep file ownership!

recommended options

@Koasing
Koasing / encode.bat
Created November 22, 2018 19:29
ffmpeg 2pass encoding
@ECHO OFF
REM 1280x 720 30fps = 5000k
REM 60fps = 7500k
REM 1920x1080 30fps = 8000k
REM 1920x0180 60fps = 12000k
:BEGIN
IF [%1]==[] GOTO :eof
@Koasing
Koasing / server_setup.sh
Last active August 11, 2019 01:03
ubuntu 1804 + nvidia driver + cuda + cudnn + docker + miniconda
# check PID
if [[ $EUID -ne 0 ]]; then
echo "Not a superuser... run with sudo."
exit 1
fi
# some magic values
SSH_PORT=42222
MACHINE_DIST="ubuntu"$(lsb_release -sr | sed -e "s/\.//g")
MACHINE_ARCH=$(uname -m)
@Koasing
Koasing / analysis.py
Created December 10, 2019 19:11
wave file lsb and msb histogram
import wave
FILENAME = 'Eternal Snow_이용신_Returned Fullmoon.wav'
wav = wave.open(FILENAME, mode='rb')
n_channels, sample_width, frame_rate, no_frames, _, _ = wav.getparams()
sample_bits = sample_width * 8
print(f'{FILENAME}')