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.
require 'openssl' | |
class String | |
def encrypt(key) | |
cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt | |
cipher.key = Digest::SHA1.hexdigest key | |
s = cipher.update(self) + cipher.final | |
s.unpack('H*')[0].upcase | |
end |
/* | |
fmod for Javascript, will work with any ECMA-262 implementation. | |
If you need a precision higher than 8, please use another implementation of fmod. | |
1.05 % 0.05 | |
=> 0.04999999999999999 | |
Math.fmod(1.05, 0.05) | |
=> 0 |
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 |
// This script takes an iTerm Color Profile as an argument and translates it for use with Visual Studio Code's built-in terminal. | |
// | |
// usage: `node iterm-colors-to-vscode.js [path-to-iterm-profile.json] | |
// | |
// To export an iTerm Color Profile: | |
// 1) Open iTerm | |
// 2) Go to Preferences -> Profiles -> Colors | |
// 3) Other Actions -> Save Profile as JSON | |
// | |
// To generate the applicable color settings and use them in VS Code: |
# Print origin/HEAD branch name (default branch) | |
gdb() { | |
git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5 | |
} | |
# Print origin/HEAD branch name (default branch) | |
# uses ohmyzsh git plugin aliases https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh | |
gcdb() { | |
gco `gdb` | |
} |
inputs=($(xinput --list --id-only | sort -hr | tr "\n" " ")) | |
for i in "${inputs[@]}"; do | |
echo $i | |
xinput --disable $i | |
done | |
sleep 10 | |
for i in "${inputs[@]}"; do xinput --enable $i; done |
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\//" |
git checkout -b `git log -1 --pretty=%s | ruby -e "puts gets.downcase.gsub(/[^a-zA-Z0-9]+/, ' ').strip.tr(' ','_')"` |