Skip to content

Instantly share code, notes, and snippets.

View qxzg's full-sized avatar

Hale Sun qxzg

  • Beijing university of Technology
  • Beijing, China
View GitHub Profile
@KumaTea
KumaTea / update-aaaa.sh
Created July 2, 2020 03:58
Update AAAA records of selected domains for dnsmasq in OpenWrt
host_file="/tmp/hosts-custom"
if test -f "$host_file"; then
rm $host_file
echo "$host_file exists, now is removed."
else
echo "$host_file does not exist."
fi
domains="npupt.com 4.npupt.com 6.npupt.com checkipv6.dyndns.com checkipv6.dyndns.com checkipv6.dyndns.com checkipv6.dyndns.com"
dns="223.5.5.5"
@ihipop
ihipop / frp systemd.md
Last active November 5, 2024 02:15
FRP systemd 启动脚本 FRP systemd init config
@fotock
fotock / nginx.conf
Last active November 9, 2025 20:56 — forked from plentz/nginx.conf
Nginx SSL 安全配置最佳实践.
# 生成 dhparam.pem 文件, 在命令行执行任一方法:
# 方法1: 很慢
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# 方法2: 较快
# 与方法1无明显区别. 2048位也足够用, 4096更强
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active September 27, 2025 00:07
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example