Skip to content

Instantly share code, notes, and snippets.

@44213
44213 / ffmpeg-commands.sh
Created September 17, 2021 19:51 — forked from rowe-morehouse/ffmpeg-commands.sh
ffmpeg commands.
# To extract the sound from a video and save it as MP3:
ffmpeg -i <video.mp4> -vn <sound>.mp3
# To convert frames from a video or GIF into individual numbered images:
ffmpeg -i <video.mpg|video.gif> <frame_%d.png>
# To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF:
ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif>
# To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image:
@luckydev
luckydev / gist:b2a6ebe793aeacf50ff15331fb3b519d
Last active October 22, 2022 14:03
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@4ft35t
4ft35t / xdown.sh
Last active August 4, 2017 04:35
Download file use ISP's cache server for more speed.
#!/bin/bash
[ $# -eq 0 ] && echo "see aria2c -h" && exit
url=""
cdn='
120.52.73.2
120.52.73.4
120.52.73.6
120.52.73.7
120.52.73.10

Rsync(Remote Sync):10个实用的例子

| Rsync (Remote Sync): 10 Practical Examples of Rsync Command in Linux

Linux/Unix系统中,同本地操作一样能够进行远程拷贝,同步文件和文件夹的场景中,用得最多的命令就是Rsync(Remote Sync)。 使用rsync命令,可以用来在本地,远程机器之间拷贝同步文件,文件夹;能够跨文件夹,跨硬盘和网络;进行数据备份;制作机器镜像。

该文章包含了简单和高级的10个例子,解释了使用rsync命令将文件在本地和远程的linux机器之间传递。 运行rsync命令并不需要root用户的权限。

@ePirat
ePirat / spec.md
Last active June 30, 2024 17:00
Icecast Protocol specification

Icecast protocol specification

What is the Icecast protocol?

When speaking of the Icecast protocol here, actually it's just the HTTP protocol, and this document will explain further how source clients need to send data to Icecast.

HTTP PUT based protocol

Since Icecast version 2.4.0 there is support for the standard HTTP PUT method. The mountpoint to which to send the data is specified by the URL path.

@imesh
imesh / build-haproxy-on-osx.sh
Last active August 22, 2016 13:57
Build HAProxy on OSX
# Install Xcode/Preferences/Downloads/Command Line Tools, this will install make for OSX
# Download HAProxy source (tar.gz) bundle.
make ARCH=x86_64 and TARGET=darwin
make install
# Once the installation is complete haproxy executable could be found at: /usr/local/sbin/haproxy
@plentz
plentz / nginx.conf
Last active July 22, 2024 11:19
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048