Skip to content

Instantly share code, notes, and snippets.

View rafaelglikis's full-sized avatar

Rafael Glikis rafaelglikis

  • learnworlds
  • Paphos, Cyprus
View GitHub Profile
@rafaelglikis
rafaelglikis / video-cutter.sh
Last active December 6, 2019 23:17
Video Cutter is a small script that takes multiple cuts of multiple videos given a parameter file.
#!/bin/bash
if [[ "$#" -lt 2 ]]; then
echo "Usage:"
echo " $0 <input_file> <output_dir> [delimiter]"
echo
echo " input_file"
echo " Paramater file. Input file contents should be in the form:"
echo " <videoFileName>=<start>=<duration>=<cut_name>"i
echo " example:"
echo " Mozart Concerto no. 23 maestros.mp4=00:02:55=00:01:13=Mozart 1st movementA.mp4"
@rafaelglikis
rafaelglikis / sleep_ms.c
Created April 7, 2017 16:42
Cross-platform sleep function for C
/**
* Cross-platform sleep function for C
* @param int milliseconds
*/
void sleep_ms(int milliseconds)
{
#ifdef WIN32
Sleep(milliseconds);
#elif _POSIX_C_SOURCE >= 199309L
struct timespec ts;