Skip to content

Instantly share code, notes, and snippets.

View bluvertigo's full-sized avatar

Andrea Gentili bluvertigo

View GitHub Profile
@bluvertigo
bluvertigo / timelapse.md
Last active March 29, 2018 11:46 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@bluvertigo
bluvertigo / logical-operator.md
Last active November 23, 2017 11:07 — forked from beezeebly/gist:8153584
Logical Operator

Logical Operators

  • && and (both are true)
  • || or (at least one is true)
  • ! not

AND

true && true
// true
#!/bin/bash
#setup variables
x="/share/cam" #base dir to search
date=$(date +"%Y%m%d%H%M") #date used throughout script
fileprefix="yt_"
ytemail="youremail" #your youtube email account
ytpassword="password" #your youtube password
emailfrom="youremail(Your Name)" #your email address and from name
emailuser="youremail" #your gmail address
emailpassword="password" #your gmail password
@bluvertigo
bluvertigo / download_podcast.sh
Last active July 31, 2022 18:50 — forked from hrwgc/validate.sh
bash wget - check if file exists at url before downloading
#!/bin/bash
# simple function to check http response code before downloading a remote file
# example usage:
# if `validate_url $url >/dev/null`; then dosomething; else echo "does not exist"; fi
function validate_url () {
if [[ `curl -s --head "$1" | head -n 1 | grep "HTTP/[1-3].[0-9] [23].."` ]]
then
# 0 = true
@bluvertigo
bluvertigo / 0_reuse_code.js
Created July 8, 2014 11:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console