Skip to content

Instantly share code, notes, and snippets.

@QasimK QasimK/pet-snippet.toml
Last active Oct 10, 2019

Embed
What would you like to do?
description
[[snippets]]
description = "Cut a video file"
command = "ffmpeg -i <file> -ss <start> -to <end> -c copy cut-<file>"
output = ""
[[snippets]]
description = "Strip all personal data from an image using exiftool"
command = "exiftool -all= <image>"
output = ""
[[snippets]]
description = "Print timestamps of all keyframes of a video file"
command = "ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries frame=pkt_pts_time -of csv=print_section=0 <file>"
output = ""
[[snippets]]
description = "Mount a drive \"better\""
command = "udisksctl mount -b /dev/sd<letter><number>"
output = ""
[[snippets]]
description = "Pretty print all mount points"
command = "mount | column -t"
output = ""
[[snippets]]
description = "Get the Weather"
command = "curl wttr.in"
output = ""
[[snippets]]
description = "Get your IP address"
command = "curl ifconfig.co"
output = ""
[[snippets]]
description = "qrencode -s 7 -o - \"<string>\" --type ANSI256"
command = "Display a QR code"
output = ""
[[snippets]]
description = "Transcode a video to a target bit rate"
command = "ffmpeg -y -i <file> -c:v libx264 -b:v 8000k -pass 1 -an -f mp4 /dev/null; and ffmpeg -i <file> -c:v libx264 -b:v 8000k -pass 2 -c:a copy out-<file>"
output = ""
[[snippets]]
description = "Transcode/Downscale a video to 1080p H.264"
command = "ffmpeg -i <file> -c:v libx264 -preset slow -vf scale=w=1920:h=1080:force_original_aspect_ratio=decrease:flags=lanczos -c:a copy -movflags +faststart 1080p-<file>"
output = ""
[[snippets]]
description = "Transcode/Downscale a video to 1080p H.265"
command = "ffmpeg -i <file> -c:v libx265 -preset slow -vf scale=w=1920:h=1080:force_original_aspect_ratio=decrease:flags=lanczos -c:a copy -movflags +faststart 1080p-<file>"
output = ""
[[snippets]]
description = "Start a webserver serving current folder"
command = "python -m http.server 8080 --bind 127.0.0.1"
output = ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.