Skip to content

Instantly share code, notes, and snippets.

@thediveo
thediveo / tapclient.c
Last active March 22, 2019 07:38
TAP client supporting specifying TAP ifname and TAP client network namespace
/* modified from: https://github.com/a34729t/exp/blob/master/tunclient.c */
#define _GNU_SOURCE
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <net/if.h>
#include <linux/if_tun.h>
@thediveo
thediveo / extract-frames
Last active October 10, 2024 09:11
Scans for extracted frame image PNG files and (re)extracts the frame directly from their corresponding video media files, using source resolution and orientation instead of project resolution and orientation. Frame image PNG files are searched in the current working directory, as well as all its sub directories.
#!/bin/bash
#
# (Re-) Extract frame images directly from its corresponding video media
# file. The frame image filenames are expected to be in the format of
# videofilename-f000000.png, that is: the filename of the video media file,
# but without its extension, then followed by "-f" and a six digit frame
# number (base 10), and finally the ".png" suffix.
#
# Copyright 2018 TheDiveO
#