Skip to content

Instantly share code, notes, and snippets.

@basperheim
basperheim / ffmpeg-merge-folder-of-videos.md
Last active May 18, 2025 14:45
Use FFmpeg to merge a directory of AVI files by appending each file name to a text file

FFmpeg: merge a folder of AVI files with names that include order number

You can merge a series of .avi files with ffmpeg using the concat filter. However, the concat filter requires that all inputs have the same streams (same codecs, same time base, etc.).

Here is an example of how you can do it (each video file should end in ..-01.avi, ..-02.avi, etc..):

Create the text file using echo

First, create a file that contains the list of all your .avi files. You can do this manually, but if your files are named in a sequence like 01.avi, 02.avi, 03.avi, and so on, you can generate this list automatically using a bash command. Here's how you can do it:

@kabili207
kabili207 / Rclone systemd service.md
Last active June 19, 2025 12:37
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@Pandry
Pandry / Firewalld GeoIP firewall script
Last active May 25, 2025 02:35
Block countries IPs via Firewalld
#!/bin/bash
##
# Name: GeoIP Firewall script
# Author: Pandry
# Version: 0.1.1
# Description: This is a simple script that will set up a GeoIP firewall blocking all the zones excecpt the specified ones
# it is possible to add the whitelisted zones @ line 47
# Additional notes: Usage of [iprange](https://github.com/firehol/iprange) is suggested
# for best performances
@n-st
n-st / view-on-archive-org.js
Created February 28, 2016 16:20
Bookmarklet to view current page on the Internet Archive Wayback Machine (https://archive.org/)
javascript:(function(){if(location.href.indexOf('http')!=0){input=prompt('URL:','http://');if(input!=null){location.href='http://web.archive.org/web/*/'+input}}else{location.href='http://web.archive.org/web/*/'+location.href;}})();