Skip to content

Instantly share code, notes, and snippets.

@yradunchev
Last active December 12, 2015 01:18
Show Gist options
  • Select an option

  • Save yradunchev/4690113 to your computer and use it in GitHub Desktop.

Select an option

Save yradunchev/4690113 to your computer and use it in GitHub Desktop.
various command lines for various tasks...
# take snapshot with ffmpeg
ffmpeg -ss 00:01:22 -t 1 -i <inputfile> -f mjpeg <outputfile>
# read configs
sed '/ *#/d; /^ *$/d' apache2
# distance and time from my rundiary, last seven day - http://yordan.radunchev.com/running/rundiary
curl -s http://yordan.radunchev.com/running/rundiary | \
awk -F"," 'NR>2&&$NR<10{km+=$2; split($3, t, ":"); sum+=60*60*t[1]+60*t[2]+t[3]}END{print km/1000, strftime("%T",sum,1)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment