Skip to content

Instantly share code, notes, and snippets.

# Adds 3-sec fading out title image before video.
# What's going on here: We get title.png image, loop it for 3 sec video, create 3 sec silence, get video.mp4 (framerate 25). Next, we add fade out filter on looped image video, after that we concat our image video, audio silence and main video into one. Easy peasy.
ffmpeg -loop 1 -framerate 25 -t 3 -i title.png -t 3 -f lavfi -i aevalsrc=0 -i video.mp4 -filter_complex '[0:0]fade=out:50:25:alpha=1[title]; [title][1:0][2:0][2:1] concat=n=2:v=1:a=1' output.mp4
@elclanrs
elclanrs / retext.css
Last active September 13, 2021 10:25
Markdown theme for ReText
body {
color: #333;
font: normal 16px/1.3 Arial, sans-serif;
max-width: 6.5in;
margin: 0 auto;
}
a:link, a:visited {
color: #1B70D1;
text-decoration: none;
@Kartones
Kartones / postgres-cheatsheet.md
Last active April 24, 2024 11:43
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@carsondarling
carsondarling / notify-send.sh
Last active September 6, 2021 09:15
Replacement for notify-send to auto-remove notifications for Gnome Shell.
#!/bin/sh
# Save this script as /usr/local/bin/notify-send and make sure to chmod +x!
# NOTE: This has not been extensively tested, though it does work with
# XChat. Let me know if it works with others!
# Make all notify-send calls go away after they've popped up
/usr/bin/notify-send --hint int:transient:1 $@
@jasonrudolph
jasonrudolph / git-branches-by-commit-date.sh
Created February 12, 2012 20:40
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r