Skip to content

Instantly share code, notes, and snippets.


Ricardo Gaviria gaviriar

  • Basel, Switzerland
View GitHub Profile
gaviriar / parse_args.c
Last active Oct 25, 2018
Parse arguments and concatenate to a sentence
View parse_args.c
* @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
gaviriar /
Created Jun 20, 2018
Bash script to dump the full reverse dependency tree of of a list of specified debian packages
# 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 /
Created Feb 11, 2018
merge PDF files in directory specified as input argument
if [ -z "$1" ]
echo "Usage: ./ <pdf-directory> <output-filename>"
exit 1
# This section assumes you have the binary pdfunite in your path
# If not you can install them by:
# sudo apt-get install poppler-utils
View gist:a5e084f344e7f4df3c370e777abef223
Verifying my Blockstack ID is secured with the address 17WK5zCHxDWtjfWB4cvL3wnZ4tX7yBJnYB
gaviriar /
Last active Feb 20, 2016
This is a simple script to grab frames from a video file at 3 second intervals using FFMPEG
# 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 ));
ffmpeg -accurate_seek -ss $i -i GOPR5934.MP4 -frames:v 1 GOPR5934_$i.jpg