Skip to content

Instantly share code, notes, and snippets.

View gaviriar's full-sized avatar

Ricardo Gaviria gaviriar

  • Basel, Switzerland
View GitHub Profile
@gaviriar
gaviriar / framegrabber.sh
Last active February 20, 2016 16:11
This is a simple script to grab frames from a video file at 3 second intervals using FFMPEG
#!/bin/bash
# this is a simple script to grab frames from a MP4 file (GOPR5934) using FFMPEG
# at a range of seconds 180 secs to 540 secs in 3 second intervals
# Modify the seconds and the file as you wish. I will improve it through time :)
for i in {180..540};
do if (( $(($i % 3)) == 0 ));
then
ffmpeg -accurate_seek -ss $i -i GOPR5934.MP4 -frames:v 1 GOPR5934_$i.jpg
fi;
done
Verifying my Blockstack ID is secured with the address 17WK5zCHxDWtjfWB4cvL3wnZ4tX7yBJnYB https://explorer.blockstack.org/address/17WK5zCHxDWtjfWB4cvL3wnZ4tX7yBJnYB
@gaviriar
gaviriar / pdf_merge.sh
Created February 11, 2018 16:21
merge PDF files in directory specified as input argument
if [ -z "$1" ]
then
echo "Usage: ./margepdf.sh <pdf-directory> <output-filename>"
exit 1
fi
# This section assumes you have the binary pdfunite in your path
# If not you can install them by:
# sudo apt-get install poppler-utils
@gaviriar
gaviriar / dump_rdepends.sh
Created June 20, 2018 06:26
Bash script to dump the full reverse dependency tree of of a list of specified debian packages
#!/bin/bash
# Bash script to dump the full recursive list of reverse
# dependencies of a list of debian packages
#
# Useful when trynig to identify dependency conflicts in your machine
# so you can check the output on your machine to the output of another machine
# which does not have this problem.
# declare an array holding dependencies to dump
@gaviriar
gaviriar / parse_args.c
Last active October 25, 2018 12:35
Parse arguments and concatenate to a sentence
/**
* @brief Concatenate the strings in input
* arguments to a space separated sentence
* into an output buffer.
*/
void parse_args(int argc, char* argv[], char* buffer)
{
// copy the first argument
strcpy(buffer, argv[1]);
// contatenate each proceeding argument