Skip to content

Instantly share code, notes, and snippets.

@mckelvey
mckelvey / GIF-Screencast-OSX.md
Created November 21, 2019 20:54 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@mckelvey
mckelvey / postgres_queries_and_commands.sql
Created August 22, 2019 19:38 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@mckelvey
mckelvey / timelapse.md
Created July 10, 2019 19:35 — forked from billmei/timelapse.md
ffmpeg time-lapse

Convert sequence of GoPro Hero 6 Black JPEG images to MKV / MP4 video

ffmpeg \
  -r 30000/1001 \
  -pattern_type glob -i '*.JPG' \
  -vf "crop=in_w:in_w*9/16,scale=3840:-2" \
  -sws_flags lanczos \
  -pix_fmt yuv420p \
 -vcodec libx264 \
@mckelvey
mckelvey / wget.sh
Last active August 6, 2022 14:45 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
wget --recursive --no-clobber --page-requisites --adjust-extension --span-hosts --convert-links --no-parent --no-check-certificate -erobots=off --domains yoursite.com yoursite.com/whatever/path