Skip to content

Instantly share code, notes, and snippets.

@Stefal
Stefal / ubxconfig.sh
Last active June 9, 2023 15:07 — forked from hdoverobinson/ubxconfig.sh
Configure u-blox GPS/GNSS modules with Bash
#!/bin/bash
###AUTHOR###
#Harry Dove-Robinson 5/8/2017
#[email protected]
#https://gist.github.com/hdoverobinson
#https://github.com/hdoverobinson
###USAGE###
#This is a script used to configure u-blox GPS/GNSS modules from a text file generated by u-center.
@Stefal
Stefal / extract_first_last_frame.sh
Last active January 23, 2025 11:29
Extract first and last frame from a video file with the timestamp
#!/bin/bash
for file in $(ls *.mp4)
do
#create output file name
of_start=`echo $file | sed s/.mp4/_01.jpg/`
of_end=`echo $file | sed s/.mp4/_02.jpg/`
#parse ffprobe output to get the frame count in the video file
frame_count=`ffprobe -show_streams "$file" 2> /dev/null | grep nb_frames | head -1 | cut -d \= -f 2`
#parse ffprobe output to get the creation_time
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
import os, sys, datetime, time, argparse, exifread
import xml.etree.ElementTree as ET
from collections import namedtuple