ffmpeg -i input.mp4 -af "volume=<volume_level>" output.mp4
input.mp4: The input video file.
-af: Stands for audio filter. This option tells FFmpeg to apply an audio filter.
# https://gist.github.com/wteuber/c435bafcd79beb91b65e354fc907efe8 | |
# macOS/zsh | |
# Apply Ruby's keyword argument and hash value omission in a git repo | |
# First occurence only | |
git grep -lP '\b([A-Za-z0-9_]+): \1\b[,\)]' -- '*.rb' | head -1 | xargs -I {} sed -i -E 's/\b([A-Za-z0-9_]+): \1\b([,\)])/\1:\2/g' "{}" | |
# Apply for "<var>: <var>," and "<var>: <var>)" | |
git grep -lP '\b([A-Za-z0-9_]+): \1\b[,\)]' -- '*.rb' | xargs -I {} sed -i -E 's/\b([A-Za-z0-9_]+): \1\b([,\)])/\1:\2/g' "{}" |
#!/bin/bash | |
# Usage: ./generate_random_bitmaps.sh <width> <height> <color> <entropy> | |
# Example ./generate_random_bitmaps.sh 100 100 red 0.8 | |
# Default dimensions | |
WIDTH=${1:-100} | |
HEIGHT=${2:-100} | |
PIXELS=$((WIDTH * HEIGHT)) |
git ls-files | xargs wc -w 2> /dev/null | ruby -e "puts ARGF.map{_1.scan(/^\s*(\d+)/)[0][0].to_i}.inject(&:+)" |
ffmpeg -i "My Movie.mp4" -vf "fps=10,scale=320:-1:flags=lanczos" -c:v pam -f image2pipe - | convert -delay 10 - -loop 0 -layers optimize output.gif |
export PAGER="cat" | |
git --no-pager log -S'search_term' --source --all --pretty=format:'%H' | xargs -I {} gh pr list --search "{}" --state merged --json url -q '.[].url' | sort -u |
SELECT | |
table_name AS `Table`, | |
table_rows AS `Row Count`, | |
ROUND(data_length + index_length) AS `Size (Bytes)`, | |
CASE | |
WHEN data_length + index_length < 1024 THEN CONCAT(ROUND((data_length + index_length), 2), ' B') | |
WHEN data_length + index_length < 1024 * 1024 THEN CONCAT(ROUND((data_length + index_length) / 1024, 2), ' KB') | |
WHEN data_length + index_length < 1024 * 1024 * 1024 THEN CONCAT(ROUND((data_length + index_length) / 1024 / 1024, 2), ' MB') | |
WHEN data_length + index_length < 1024 * 1024 * 1024 * 1024 THEN CONCAT(ROUND((data_length + index_length) / 1024 / 1024 / 1024, 2), ' GB') | |
ELSE CONCAT(ROUND((data_length + index_length) / 1024 / 1024 / 1024 / 1024, 2), ' TB') |
ffmpeg -i input.mp4 -af "volume=<volume_level>" output.mp4
input.mp4: The input video file.
-af: Stands for audio filter. This option tells FFmpeg to apply an audio filter.
#reduce PDF size | |
#-dPDFSETTINGS | |
# /screen | |
# /ebook | |
# /printer | |
# /prepress | |
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -sOutputFile=out.pdf in.pdf |
An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
github-pages was resolved to 228, which depends on
jekyll-avatar was resolved to 0.7.0, which depends on
jekyll was resolved to 3.9.3, which depends on
em-websocket was resolved to 0.5.3, which depends on
eventmachine
# install and set up gh (https://cli.github.com/) | |
GH_USER=`gh auth status | grep -oue "Logged in to github.com as [^ ]*" | grep -oue "[^ ]*$"` | |
gh gist list -L1000 | sed -e "s/^/https:\/\/gist.github.com\/$GH_USER\//" |